摘要: 一文彻底弄懂Spring Boot的启动过程 一,Spring Boot启动过程 1. 启动入口 Spring Boot 应用的启动入口通常是一个包含 @SpringBootApplication 注解的主类,并调用 SpringApplication.run() 方法。@SpringBootApp 阅读全文
posted @ 2025-09-15 19:43 shanxin1954 阅读(49) 评论(0) 推荐(0)
摘要: springboot在哪里写自己的代码。 @SpringBootApplication public class FooApplication { public static void main(String[] args) { SpringApplication.run(FooApplicatio 阅读全文
posted @ 2025-09-15 19:41 shanxin1954 阅读(4) 评论(0) 推荐(0)
摘要: 试着基于jdbctemplate包装一个MysqlHelper类。连接池采用springboot默认的hikari。jdbctemplate提供基本的防注入,它的写法比jdbc好看,jdbc还需要putint,putstr。提供的另一个功能是结果集的转换。写完,测试代码的面貌如下: var sqlh 阅读全文
posted @ 2025-09-15 18:23 shanxin1954 阅读(7) 评论(0) 推荐(0)