2020年11月14日
摘要: 1.ClassPathXmlApplicationContext 它是从类的根路径下加载配置文件推荐使用这种 public clas... 阅读全文
posted @ 2020-11-14 23:21 凸凸大军的一员 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 使用原始注解还不能全部替代xml配置文件,还需要使用注解替代的配置如下: 1.非自定义的Bean配置: 2.加载properties... 阅读全文
posted @ 2020-11-14 23:19 凸凸大军的一员 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 本博客依据是是spring原始注解-02的代码 注入普通数据类型:@Value注解的使用 1.添加driver属性,使用value... 阅读全文
posted @ 2020-11-14 19:41 凸凸大军的一员 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 使用@Repository、@Service、@Controller注解配置,使其更加清晰属于哪一层,因为我是模拟的web层,所有没... 阅读全文
posted @ 2020-11-14 18:29 凸凸大军的一员 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 我们使用xml-Bean标签的配置方式和注解做对比理解 1.创建UserDao接口以及UserDao的实现类UserDaoImpl... 阅读全文
posted @ 2020-11-14 18:02 凸凸大军的一员 阅读(48) 评论(0) 推荐(0) 编辑
摘要: spring原始注解主要是替代Bean标签的配置 @Component:使用在类上用于实例化Bean @Controller:使用... 阅读全文
posted @ 2020-11-14 16:34 凸凸大军的一员 阅读(60) 评论(0) 推荐(0) 编辑