随笔分类 - Spring
摘要:###1. 导入pom配置 <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.9.6</version> </dependency> ###2. applicat
阅读全文
摘要:###1. 整合Junit框架 //在@Test所在的类上添加,并在所要用到的方法上 类型注入 @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations="classpath:com/c21w/SpringLear
阅读全文
摘要://需要在applicationContext.xml中配置 <context:component-scan base-package="com.c21w"></context:component-scan> ###1. 把类存入IOC容器 //类上注解 //XX 和xml中bean标签的id作用相
阅读全文
摘要:###1. 创建Bean对象的三种方式 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/200
阅读全文
摘要:###1. 导入maven依赖 <!--引入Spring依赖--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>5.2.0.RELEASE</v
阅读全文