Spring04---Annotation注入
来源:互联网 发布:正版mac ps软件多少钱 编辑:程序博客网 时间:2024/05/15 23:50
Annotation注入
1.1 创建Bean 使用@Component
1.2 做依赖注入, 在setter方法上添加@Resource
1.2.1 测试添加
1.3、设置多例prototype
2、为了更好区分分层, bean的注解,不在使用@component
@Repository("userDao") //@Repository一般使用Dao的注入public class UserDao implements IUserDao{@Service("userService") //业务层一般使用@Servicepublic class UserService implements IUserService {@Controller("userAction") //MVC控制层一般使用@Controller@Scope("prototype")public class UserAction {
阅读全文
0 0
- Spring04---Annotation注入
- Spring04
- Spring04
- spring04
- SSH与SSM学习之Spring04——Spring属性注入之set方法注入
- spring04 注解
- SSH采用annotation注入
- spring Annotation 组件注入
- 注解注入annotation
- Spring中使用annotation注入
- 使用自定义annotation完成注入
- Spring中使用annotation注入
- spring annotation 注入static 属性
- Spring中使用annotation注入
- Spring中使用annotation注入
- spring annotation注解 依赖注入
- Spring中使用annotation注入
- 第二章 IoC Annotation注入
- 387.First Unique Character in a String
- 389.Find the Difference
- 412. Fizz Buzz
- spring EnableScheduling标签使用详解
- 巡视整改不能走过场,更不能搞“一风吹”
- Spring04---Annotation注入
- Linux简介
- 济南情况谷歌来看看!
- java 精度的要求
- PHP的password_hash()使用实例
- Spark1.4.0-SparkSQL与Hive整合-支持窗口分析函数
- QPROPERTY
- jsday05(js回顾 dom回顾)
- exe触发断点