上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页

2022年11月20日

SpringBoot14(监听机制)

摘要: 一、java监听机制(麻烦、繁琐,不推荐) 二、SpringBoot监听机制 三、代码实现 1-包的定义 2-listener代码块 1-MyApplicationContextInitializer MyApplicationContextInitializer代码块 @Component pub 阅读全文

posted @ 2022-11-20 23:22 陈嘻嘻- 阅读(39) 评论(0) 推荐(0)

2022年11月19日

SpringBoot13(springboot自定义Starter)

摘要: * 实现: 一、自定义Starter 最简实现 1、classpath(springboot下是resources)路径下创建MATA-INF/spring.factories文件,写入需要加载的 配置类全路径,仿照别人的spring.factories写即可 2、实现配置类,提供一个bean 3、 阅读全文

posted @ 2022-11-19 20:57 陈嘻嘻- 阅读(67) 评论(0) 推荐(0)

SpringBoot12(@EnableAutoConfigura注解)

摘要: ![](https://img2022.cnblogs.com/blog/2871529/202211/2871529-20221119140256789-2050482188.png) 阅读全文

posted @ 2022-11-19 14:04 陈嘻嘻- 阅读(22) 评论(0) 推荐(0)

2022年11月16日

SpringBoot11(@Improt注解)

摘要: 一、介绍@improt 1-@Import注解的作用是什么? 通过导入的方式,来实现把"实例"加入Spring容器中的功能。 2-@Import注解能够导入哪些类? 可以导入普通类; 可以和@Configuration注解的类搭配使用; 可以和实现了ImportSelector和ImportBean 阅读全文

posted @ 2022-11-16 21:57 陈嘻嘻- 阅读(120) 评论(0) 推荐(0)

spingboot10(切换内置web服务器)

摘要: 1-我们在使用SpringBoot_Web的使用默认会使用"Tomcat"服务器 2-查看SpringBoot服务器的内置种类 * * 解析:知道了SpringBoot的4种服务器种类,现在就可以选择切换 3-切换SpringBoot服务器(导入不同web服务器的坐标,就可以切换对应的服务器) 3. 阅读全文

posted @ 2022-11-16 19:28 陈嘻嘻- 阅读(113) 评论(0) 推荐(0)

2022年11月13日

springboot09(condition-自动配置02)

摘要: 一、在前面condition-01中存在许多问题,比如配置烦琐,查找固定死板等等 二、这个condition-自动配置02,直接使用springboot给我们的配置来更好的使用condition 三、拿properties来演示 ###(如果properties文件夹里面有"键=MyName ,值= 阅读全文

posted @ 2022-11-13 17:01 陈嘻嘻- 阅读(25) 评论(0) 推荐(0)

2022年11月12日

springboot08(自动配置Condition-01)

摘要: 主旨: 1-springboot做的事情就是判断context.getBean("user"),是否有对应的字节码文件/对应的Bean 2-user是否有bean要看@Bean和@Conditional(ClassCondition.class) 3-Conditional(ClassConditi 阅读全文

posted @ 2022-11-12 18:03 陈嘻嘻- 阅读(45) 评论(0) 推荐(0)

2022年11月10日

SpringBoot07(springboot整合MyBatis)

摘要: 一、整体思路解析: 二、步骤分析: 1-搭建springboot的工程(在idea里面搭建,略) 2-引入MyBatis的起步依赖,添加msql驱动 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache. 阅读全文

posted @ 2022-11-10 21:19 陈嘻嘻- 阅读(62) 评论(0) 推荐(0)

2022年11月8日

SpringBoot06(spring整合redis)

摘要: 用springboot整合redis的文件 1-目录的路径: 2-SpringRedisapplicationTests文件信息 @RunWith(SpringRunner.class) @SpringBootTest class SpringbootRedisApplicationTests { 阅读全文

posted @ 2022-11-08 22:33 陈嘻嘻- 阅读(28) 评论(0) 推荐(0)

SpringBoot05(内部加载配置顺序)

摘要: * 1-优先级 小结:每个文件里面的配置都会被解析,但是会根据1-4的优先级而选取 阅读全文

posted @ 2022-11-08 20:22 陈嘻嘻- 阅读(23) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页

导航