摘要:
简介 Spring结合Junit测试只能在test包下! 原理:通过@ContextConfiguration()给test注入applicationContext。通过注解注入获取对象@RunWith(SpringJUnit4ClassRunner.class)@ContextConfigurat 阅读全文
posted @ 2021-11-16 20:39
remix_alone
阅读(32)
评论(0)
推荐(0)
摘要:
简介 Spring作为容器,除了在xml配置对象。也可以通过注解配置对象。 注解 Spring的原始注解主要代替<Bean>的配置 @Component:使用在类上用于实例化Bean(Spring注入) @Controller:使用在web层类上用于实例化Bean @Service:使用在servi 阅读全文
posted @ 2021-11-16 20:21
remix_alone
阅读(44)
评论(0)
推荐(0)

浙公网安备 33010602011771号