码迷,mamicode.com
首页 >  
搜索关键字:spring注解    ( 611个结果
spring-注解---autowired
spring-注解 autowired package com.zwj.bean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Compone ...
分类:编程语言   时间:2018-10-27 16:07:32    阅读次数:175
spring--注解---IOC(3)
spring--注解 IOC(3) package com.zwj.bean; public class Blue { public Blue(){ System.out.println("blue...constructor"); } public void init(){ System.out. ...
分类:编程语言   时间:2018-10-27 13:28:09    阅读次数:172
spring-注解--- IOC ( 2 )
spring-注解 IOC(2) package com.zwj.bean; import org.springframework.beans.factory.annotation.Value; public class Person { private String name; private I ...
分类:编程语言   时间:2018-10-27 11:55:19    阅读次数:161
spring-注解---LifeCylce
(2) spring-注解 LifeCylce package com.zwj.bean; import org.springframework.stereotype.Component; @Component public class Car { public Car(){ System.out. ...
分类:编程语言   时间:2018-10-27 10:57:53    阅读次数:220
spring-注解 (1)
spring-注解 (1) -- include/exclude package com.zwj.bean; import org.springframework.stereotype.Component; @Component public class Car { public Car(){ Sy ...
分类:编程语言   时间:2018-10-25 12:02:54    阅读次数:148
Spring注解之@Lazy注解,源码分析和总结
一 关于延迟加载的问题,有次和大神讨论他会不会直接或间接影响其他类。spring的好处就是文档都在代码里,网上百度大多是无用功。 不如,直接看源码。所以把当时源码分析的思路丢上来一波。 二 源码分析 三 总结 就是分两种情况作用于 配置和其相关方法等先加载的 ,作用于 Autowired等后加载的。 ...
分类:编程语言   时间:2018-10-19 14:01:58    阅读次数:241
关于@Profile、@Conditional、@Primary、@Qualifier及@Scope等实现高级装配的spring注解
1、关于@Profile注解的介绍@Profile注解主要用在针对不同环境而条件选择的注入bean在开发过程中由于环境的不同,我们可能在针对某些功能,需要开发不同的实现,然而在某种环境中,只能激活其中一种实现,其他的实现处于不激活的状态。这个时候我们在需要创建的bean上添加@Profile注解,如 ...
分类:编程语言   时间:2018-10-16 13:43:07    阅读次数:179
[Spring]Spring注解
@Required注解 @Required注解用于setter方法,表明这个属性是必要的,不可少的,必须注入值 假设有个测试类,里面有name和password两个属性 我给两个属性的setter方法都加了@Required注解 现在我只给一个属性加注入,另一个不加 可以看到报错 然后我补上注入之后 ...
分类:编程语言   时间:2018-09-29 00:42:45    阅读次数:186
Spring 注解<context:annotation-config> 和 <context:component-scan>的作用与区别
<context:annotation-config> 是用于激活那些已经在spring容器里注册过的bean(无论是通过xml的方式还是通过packagesanning的方式)上面的注解。(激活@Resource和@Autowired注解) <context:component-scan>除了具有 ...
分类:编程语言   时间:2018-09-29 00:10:51    阅读次数:141
Spring结合AspectJ的研究
本文阐述以下内容:1、AspectJ是什么及使用方式2、Spring AOP和AspectJ的区别3、Spring结合AspectJ的使用方法和原理4、Spring注解方式使用AspectJ遇到的问题5、总结 一、AspectJ是什么 提到面向切面编程(AOP,Aspect Oriented Pro ...
分类:编程语言   时间:2018-09-28 16:30:23    阅读次数:191
611条   上一页 1 ... 17 18 19 20 21 ... 62 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!