上一页 1 2 3 4 5 6 7 8 ··· 28 下一页
摘要: 市面上常见的日志记录框架,如下: Logback Log4j2 Log4j 1.X 官方维护已停止,基本上只有老旧项目在使用。 JUL Commons Logging SLF4J 新项目启动时,通常集成SLF4J和Log4j2,代码中使用SLF4J的日志API来记录日志,使用Log4j2来管理日志的 阅读全文
posted @ 2024-08-25 11:00 jackieathome 阅读(15) 评论(0) 推荐(0)
摘要: Web 基于SpringBoot框架开发应用,支持内嵌Tomcat/Jetty/Undertow/Netty来提供HTTP服务器。 SpringBoot当前封装了如下组件: spring-boot-starter-web spring-boot-starter-webflux Servlet Web 阅读全文
posted @ 2024-08-25 10:36 jackieathome 阅读(84) 评论(0) 推荐(0)
摘要: Data Databases SQL Databases SpringBoot提供组件: spring-boot-starter-data-jpa spring-boot-starter-jdbc spring-boot-starter-data-jdbc 关键类,如下: JdbcClient Jd 阅读全文
posted @ 2024-08-24 21:34 jackieathome 阅读(15) 评论(0) 推荐(0)
摘要: IO Caching Caching SpringBoot提供组件spring-boot-starter-cache,提供缓存能力。 关键类,如下: CacheManager CacheResolver CacheManagerCustomizer ConcurrentMapCacheManager 阅读全文
posted @ 2024-08-24 21:02 jackieathome 阅读(22) 评论(0) 推荐(0)
摘要: Messaging JMS JMS 关键类,如下: jakarta.jms.ConnectionFactory jakarta.jms.Connection JmsTemplate ActiveMQProperties ActiveMQConnectionFactoryCustomizer JmsL 阅读全文
posted @ 2024-08-24 20:17 jackieathome 阅读(14) 评论(0) 推荐(0)
摘要: Testing SpringBoot提供了组件spring-boot-test供开发者集成。 Test Scope Dependencies 组件spring-boot-test导入了对如下测试工具的依赖。 JUnit 5: The de-facto standard for unit testin 阅读全文
posted @ 2024-08-24 15:19 jackieathome 阅读(22) 评论(0) 推荐(0)
摘要: Packaging Spring Boot Applications Efficient Deployments Efficient Deployments 默认情况下,基于SpringBoot框架开发应用时,构建插件spring-boot-maven-plugin将项目打包为fat jar。 执行 阅读全文
posted @ 2024-08-24 14:59 jackieathome 阅读(71) 评论(0) 推荐(0)
摘要: Reference Core Features Profiles 类似Maven的Profile特性,限定配置项取值的生效场景。 在代码中,对于使用注解@Component、@Configuration、@ConfigurationProperties标记的类,可以增加@Profile,限定前述类的 阅读全文
posted @ 2024-08-19 23:11 jackieathome 阅读(31) 评论(0) 推荐(0)
摘要: Reference Core Features Externalized Configuration SpringBoot应用可以从properties文件、yaml文件、环境变量、命令行参数中得到配置参数。 代码里可以使用注解@Value读取配置项的值。 配置项参数的加载顺序,后加载的属性,可以覆 阅读全文
posted @ 2024-08-18 22:59 jackieathome 阅读(301) 评论(0) 推荐(0)
摘要: Reference Core Features SpringApplication 使用SpringBoot开发应用,最简单的启动类,代码内容如下: import org.springframework.boot.SpringApplication; import org.springframewo 阅读全文
posted @ 2024-08-18 17:00 jackieathome 阅读(291) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 28 下一页