上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: 戴着假发的程序员出品 抖音ID:戴着假发的程序员 欢迎关注 [查看视频教程] 我们可以通过配置basePackages让spring自动扫面有spring标准注释(参见对应的标准注释)的bean。 查看AnnotationConfigApplicationContext构造方法: 1 public 阅读全文
posted @ 2020-10-08 09:57 戴着假发的程序员0-1 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 戴着假发的程序员出品 抖音ID:戴着假发的程序员 欢迎关注 [查看视频教程] 1 java.lang.String destroyMethod() default "(inferred)"; destroyMethod和bean标签的destroyMethod属性一样,是用来配置释放资源的回调方法。 阅读全文
posted @ 2020-10-08 09:54 戴着假发的程序员0-1 阅读(4602) 评论(0) 推荐(0) 编辑
摘要: 戴着假发的程序员出品 抖音ID:戴着假发的程序员 欢迎关注 [查看视频教程] 1 java.lang.String initMethod() default ""; initMethod属性通过bean标签中的initMethod属性一样,也是来配置实例化之后的初始化方法的。 参照spring的be 阅读全文
posted @ 2020-10-08 09:52 戴着假发的程序员0-1 阅读(3770) 评论(0) 推荐(0) 编辑
摘要: 戴着假发的程序员出品 抖音ID:戴着假发的程序员 欢迎关注 [查看视频教程] boolean autowireCandidate() default true; autowireCandidate和配置文件bean标签的autowireCandidate属性一样,就是让其他的bean在按照类型注入时 阅读全文
posted @ 2020-10-07 08:59 戴着假发的程序员0-1 阅读(1028) 评论(0) 推荐(0) 编辑
摘要: 戴着假发的程序员出品 抖音ID:戴着假发的程序员 欢迎关注 [查看视频教程] 源码: 1 @java.lang.Deprecated 2 org.springframework.beans.factory.annotation.Autowire autowire() default org.spri 阅读全文
posted @ 2020-10-07 08:57 戴着假发的程序员0-1 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 戴着假发的程序员出品 抖音ID:戴着假发的程序员 欢迎关注 [查看视频教程] 源码: 1 @org.springframework.core.annotation.AliasFor("name") 2 java.lang.String[] value() default {}; 3 4 @org.s 阅读全文
posted @ 2020-10-07 08:54 戴着假发的程序员0-1 阅读(2046) 评论(0) 推荐(0) 编辑
摘要: 戴着假发的程序员出品 抖音ID:戴着假发的程序员 欢迎关注 [查看视频教程] [1]@Configuration @Configuration注解表示要给类为配置类。 我们在AppConfig类上方添加@Configuration注解,表示当前类是一个配置类。配置类本身也是spring容器中的一个元 阅读全文
posted @ 2020-10-07 08:52 戴着假发的程序员0-1 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 戴着假发的程序员出品 抖音ID:戴着假发的程序员 欢迎关注 [查看视频教程] [1]创建maven项目,添加依赖: 1 <dependency> 2 <groupId>org.springframework</groupId> 3 <artifactId>spring-context</artifa 阅读全文
posted @ 2020-10-07 08:49 戴着假发的程序员0-1 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 戴着假发的程序员出品 [查看视频教程] 我们已经知道context:component-scan的配置可以通知spring扫描拥有spring标准注解的类。这些标注大致是:@Component、@Controller、@Service、@Repository。我们也可通过context:exclud 阅读全文
posted @ 2020-10-06 09:29 戴着假发的程序员0-1 阅读(1667) 评论(0) 推荐(0) 编辑
摘要: 戴着假发的程序员出品 [查看视频教程] 我们已经知道context:component-scan的配置可以通知spring扫描拥有spring标准注解的类。这些标注大致是:@Component、@Controller、@Service、@Repository。但是我们也可以通过context:inc 阅读全文
posted @ 2020-10-06 09:28 戴着假发的程序员0-1 阅读(1572) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页