摘要: 1:pom.xml整合 <dependencies><!-- 与spring相关坐标--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>5.3 阅读全文
posted @ 2021-12-04 22:46 猫白养白猫 阅读(41) 评论(0) 推荐(0)
摘要: 1:pom.xml文件配置 <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.25</version> </dependenc 阅读全文
posted @ 2021-12-04 09:57 猫白养白猫 阅读(62) 评论(0) 推荐(0)
摘要: 1:导入坐标 <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>3.7.5</version></dependency><dependency> <gr 阅读全文
posted @ 2021-12-03 16:52 猫白养白猫 阅读(99) 评论(0) 推荐(0)
摘要: 1:pom.xml中导入坐标 <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.25</version></dependency><dependency> 阅读全文
posted @ 2021-12-02 18:36 猫白养白猫 阅读(23) 评论(0) 推荐(0)
摘要: 在web.xml中配置 <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-c 阅读全文
posted @ 2021-11-16 19:54 猫白养白猫 阅读(40) 评论(0) 推荐(0)
摘要: 在springMVC中配置 1: <!-- 配置适配器处理器映射器--> <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"> <property name= 阅读全文
posted @ 2021-11-15 18:41 猫白养白猫 阅读(128) 评论(0) 推荐(0)
摘要: @Controllerpublic class UserController { @RequestMapping(value = "/quick") public String save(){ System.out.println("controller"); return "success.jsp 阅读全文
posted @ 2021-11-14 20:49 猫白养白猫 阅读(30) 评论(0) 推荐(0)
摘要: @Configuration把一个类作为一个IoC容器,它的某个方法头上如果注册了@Bean,就会作为这个Spring容器中的Bean。@Scope注解 作用域@Lazy(true) 表示延迟初始化@Service用于标注业务层组件、@Controller用于标注控制层组件(如struts中的act 阅读全文
posted @ 2021-11-14 09:31 猫白养白猫 阅读(13) 评论(0) 推荐(0)
摘要: 在上面加入命名空间 1:xmlns:context="http://www.springframework.org/schema/context" 2:http://www.springframework.org/schema/context http://www.springframework.o 阅读全文
posted @ 2021-11-13 21:51 猫白养白猫 阅读(46) 评论(0) 推荐(0)