- 博客(6)
- 收藏
- 关注
原创 Spring的高级注解
一、配置Bean @Configuration Spring在3.x提供的注解,用于替换XML配置文件。 @Configuration public class AppConfig{ } AnnotationConfigApplicationContext 1.创建工厂代码 ApplicationContext app = new AnnotationConfigApplicationContext(); 2.指定配置文件 1.指定配置bean的Class Appl...
2022-04-19 19:43:06
596
原创 Spring的基础注解
一、对象创建相关注解 ⚪搭建开发环境 <context:component-scan base-package="com.bao"></context:component-scan> 作用:让Spring框架设置包及其子包扫描对应的注解,使其生效。 ⚪对象创建相关注解 @Component注解 替换原有spring配置文件中的<bean>标签 id属性 component注解 提供了默认的设置方式-单词首字母小写 @Component细节 1.显示指
2022-04-13 22:51:24
229
原创 Spring动态代理开发
maven仓库导入必要jar包: <!-- https://mvnrepository.com/artifact/org.springframework/spring-aop --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> ...
2022-04-13 12:20:56
331
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人