随笔分类 -  Spring

摘要:SpringBoot自动配置原理 @SpringBootApplication 这个注解是以下三个注解的合成注解 @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan( excludeFilters = {@Filter( 阅读全文
posted @ 2022-04-16 16:20 CoderCatIce 阅读(64) 评论(0) 推荐(0)
摘要:Spring注解开发 注册组件 @Configuration中配置@Bean注册组件 实体类 public class User { private int id; private String name; @Override public String toString() { return "U 阅读全文
posted @ 2022-04-06 21:23 CoderCatIce 阅读(38) 评论(0) 推荐(0)
摘要:SSM中的pom.xml pom.xml <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13.2</version> </dependency> <depe 阅读全文
posted @ 2022-03-22 00:48 CoderCatIce 阅读(86) 评论(0) 推荐(0)
摘要:Spring整合Mybatis 导入依赖 <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.38</version> </de 阅读全文
posted @ 2022-03-20 23:21 CoderCatIce 阅读(39) 评论(0) 推荐(0)
摘要:AOP实现 动态代理:代理模式 - CoderDreams - 博客园 (cnblogs.com) 方式一:使用Spring的API(参数功能强大) 实现MethodBeforeAdvice接口 添加的功能 public class Log implements MethodBeforeAdvice 阅读全文
posted @ 2022-03-20 20:46 CoderCatIce 阅读(63) 评论(0) 推荐(0)