Feature Article

SpringBoot 官方文档翻译 42 — SQL 数据库 (SQL Databases)

Spring Boot 官方文档翻译系列:DataSource、连接池、JdbcTemplate/JdbcClient、JPA、jOOQ 与 R2DBC。

SERIES 《SpringBoot翻译》 第 42 篇 共 211 篇
分类

SQL 数据库

原文:https://docs.spring.io/spring-boot/reference/data/sql.html (Spring Boot 4.2.0)

Spring Framework 为使用 SQL 数据库提供广泛支持,从直接使用 JdbcClient 或 JdbcTemplate 的 JDBC 访问,到完整的"对象关系映射"技术(如 Hibernate)。Spring Data 提供了额外一层功能:直接从接口创建 Repository 实现,并使用约定从方法名生成查询。

配置 DataSource

Java 的 DataSource 接口提供了处理数据库连接的标准化方法。传统上,DataSource 使用 URL 和一些凭据建立数据库连接。更多高级示例(通常是完全控制 DataSource 配置)请参阅"How-to 指南"中的配置自定义 DataSource 部分。

嵌入式数据库支持

使用内存嵌入式数据库开发应用通常很方便。显然,内存数据库不提供持久存储。你需要在应用启动时填充数据库,并准备好在应用结束时丢弃数据。Spring Boot 可以自动配置嵌入式 H2、HSQL 和 Derby(已弃用)数据库。只需在 classpath 上包含相应的驱动即可。数据库初始化详见数据库初始化部分。

连接生产数据库

连接到生产数据库时,需要指定连接 URL 和凭据。例如:

spring.datasource.url=jdbc:mysql://localhost/test
spring.datasource.username=dbuser
spring.datasource.password=dbpass

DataSource 配置

数据源配置由 spring.datasource.* 属性控制。例如:

spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=org.h2.Driver

如果要指定其他池选项,可以使用 spring.datasource.hikari.* 等命名空间。完整的支持选项列表请参阅附录。

支持的连接池

Spring Boot 使用以下算法选择具体实现:

  • 首选 HikariCP,因其性能和并发性。如果 HikariCP 可用,总是选择它。
  • 否则,如果 Tomcat pooling DataSource 可用,则使用它。
  • 否则,如果 Commons DBCP2 可用,则使用它。
  • 如果 HikariCP、Tomcat 和 DBCP2 都不可用且 Oracle UCP 可用,则使用它。

如果使用 spring-boot-starter-jdbc 或 spring-boot-starter-data-jpa starter,会自动获得 HikariCP 依赖。可以通过设置 spring.datasource.type 属性完全绕过该算法并指定要使用的连接池。其他连接池也可以通过 DataSourceBuilder 手动配置。

连接 JNDI DataSource

如果应用在应用服务器中运行,可能需要使用 JNDI 配置和访问 DataSource。可以使用 spring.datasource.jndi-name 属性指定 JNDI 位置:

spring.datasource.jndi-name=java:jboss/datasources/customers

延迟连接代理

Spring Boot 可以自动配置一个延迟初始化的连接代理,将实际连接创建推迟到首次使用时。可以通过 spring.datasource.lazy-connection.enabled 属性控制。

使用 JdbcTemplate

Spring 的 JdbcTemplate 和 NamedParameterJdbcTemplate 类会自动配置。可以像注入任何其他 Spring bean 一样注入它们:

@Component
public class MyBean {

	private final JdbcTemplate jdbcTemplate;

	public MyBean(JdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;
	}

	public List<Map<String, Object>> findAll() {
		return this.jdbcTemplate.queryForList("select * from customer");
	}
}

可以通过 spring.jdbc.template.* 属性定制模板,例如 spring.jdbc.template.query-timeout=5s。

使用 JdbcClient

Spring Framework 6.1 引入了 JdbcClient,它提供了一个单一的流式 API 来执行 JDBC 查询和更新。如果 JdbcTemplate 在 classpath 上,Spring Boot 会自动配置一个 JdbcClient bean:

@Component
public class MyBean {

	private final JdbcClient jdbcClient;

	public MyBean(JdbcClient jdbcClient) {
		this.jdbcClient = jdbcClient;
	}

	public List<Customer> findAll() {
		return this.jdbcClient.sql("select * from customer")
			.query((rs, rowNum) -> new Customer(rs.getLong("id"), rs.getString("name")))
			.list();
	}
}

JPA 与 Spring Data JPA

Spring Boot 为 JPA 提供自动配置。Spring Data JPA 提供 Repository 支持。

Entity 类

传统上,JPA "Entity" 类必须在 persistence.xml 中声明。有了 Spring Boot,这个文件不再需要,可以使用 @EntityScan 注解从特定包扫描实体。默认情况下,会扫描主应用类所在的包及其子包。

Spring Data JPA Repository

Spring Data JPA Repository 是定义用于访问数据的接口的标准方式。Spring Boot 会查找主应用类所在包及其子包中的 Repository 接口。可以使用 @EnableJpaRepositories 覆盖默认位置。Repository 通过 @Repository 或继承 Repository/CrudRepository 等接口标识。

Spring Data Envers Repository

Spring Data Envers Repository 提供对 JPA Envers 审计功能的支持。当 Spring Data Envers 在 classpath 上时,会自动配置。

创建和删除 JPA 数据库

默认情况下,JPA 数据库仅在使用嵌入式数据库(H2、HSQL 或已弃用的 Derby)时自动创建。可以使用 spring.jpa.* 属性显式配置 JPA 设置。例如,创建和删除表:

spring.jpa.hibernate.ddl-auto=create-drop

Hibernate 自己的内部属性名为 hibernate.hbm2ddl.auto,可以通过 spring.jpa.properties.* 设置。

Open EntityManager in View

"Open EntityManager in View"模式用于 Web 应用,允许延迟加载在视图渲染期间发生。可以通过 spring.jpa.open-in-view 属性控制,默认值为 true。

Spring Data JDBC

Spring Data JDBC 提供对 JDBC 的 Repository 支持,不依赖 JPA。如果 spring-boot-starter-data-jdbc 在 classpath 上,Spring Boot 会自动配置 Spring Data JDBC。

使用 H2 的 Web 控制台

如果 H2 在 classpath 上,Spring Boot 可以自动配置 H2 控制台。可以通过 spring.h2.console.enabled=true 启用。默认控制台路径为 /h2-console,可通过 spring.h2.console.path 更改。

更改 H2 控制台路径

spring.h2.console.path=/h2-console

在安全应用中访问 H2 控制台

如果应用启用了 Spring Security,需要配置安全规则以允许访问 H2 控制台。可以通过 PathRequest.toH2Console() 创建匹配器并允许访问,同时需要设置 spring.h2.console.settings.web-allow-others=true 以允许远程访问(仅用于开发)。

使用 jOOQ

jOOQ 是一个流行的库,用于以类型安全的方式构建 SQL 查询。Spring Boot 提供自动配置。

代码生成

jOOQ 的代码生成需要从数据库 schema 生成 Java 类。可以使用 jOOQ 的 Maven 或 Gradle 插件,或 Spring Boot 的 jooq-codegen 支持。

使用 DSLContext

Spring Boot 会自动配置一个 DSLContext bean,可以注入并使用它来构建类型安全的 SQL 查询:

@Component
public class MyBean {

	private final DSLContext dsl;

	public MyBean(DSLContext dsl) {
		this.dsl = dsl;
	}

	public List<Customer> findAll() {
		return dsl.selectFrom(CUSTOMER).fetchInto(Customer.class);
	}
}

jOOQ SQL 方言

jOOQ 需要知道要使用的 SQL 方言。Spring Boot 会根据 DataSource 的 JDBC URL 自动推断,也可以通过 spring.jooq.sql-dialect 显式指定。

定制 jOOQ

可以通过定义 DefaultConfigurationCustomizer bean 或使用 spring.jooq.* 属性定制 jOOQ 配置。

使用 R2DBC

R2DBC 为响应式应用提供非阻塞数据库访问。Spring Boot 为 R2DBC 提供自动配置。

嵌入式数据库支持

Spring Boot 可以自动配置嵌入式 H2 数据库用于 R2DBC。需要包含 io.r2dbc:r2dbc-h2 依赖。

使用 DatabaseClient

Spring Boot 会自动配置一个 DatabaseClient bean:

@Component
public class MyBean {

	private final DatabaseClient databaseClient;

	public MyBean(DatabaseClient databaseClient) {
		this.databaseClient = databaseClient;
	}

	public Flux<Customer> findAll() {
		return this.databaseClient.sql("select * from customer")
			.map((row, metadata) -> new Customer(row.get("id", Long.class), row.get("name", String.class)))
			.all();
	}
}

Spring Data R2DBC Repository

Spring Data R2DBC 提供 Repository 支持。Spring Boot 会查找主应用类所在包及其子包中的 Repository 接口。可以使用 @EnableR2dbcRepositories 覆盖默认位置。

数据 NoSQL 技术

SERIES / PATH

系列目录

查看系列页
  1. 第 1 篇 SpringBoot 官方文档翻译 01 — 概述 (Overview)
  2. 第 2 篇 SpringBoot 官方文档翻译 02 — 文档概览 (Documentation Overview)
  3. 第 3 篇 SpringBoot 官方文档翻译 03 — 社区 (Community)
  4. 第 4 篇 SpringBoot 官方文档翻译 04 — 系统要求 (System Requirements)
  5. 第 5 篇 SpringBoot 官方文档翻译 05 — 安装 Spring Boot (Installing Spring Boot)
  6. 第 6 篇 SpringBoot 官方文档翻译 06 — 升级 Spring Boot (Upgrading Spring Boot)
  7. 第 7 篇 SpringBoot 官方文档翻译 07 — 教程 (Tutorials)
  8. 第 8 篇 SpringBoot 官方文档翻译 08 — 开发第一个 Spring Boot 应用 (Developing Your First Spring Boot Application)
  9. 第 9 篇 SpringBoot 官方文档翻译 09 — 参考文档 (Reference)
  10. 第 10 篇 SpringBoot 官方文档翻译 10 — 使用 Spring Boot 进行开发 (Developing with Spring Boot)
  11. 第 11 篇 SpringBoot 官方文档翻译 11 — 构建系统 (Build Systems)
  12. 第 12 篇 SpringBoot 官方文档翻译 12 — 代码结构 (Structuring Your Code)
  13. 第 13 篇 SpringBoot 官方文档翻译 13 — 配置类 (Configuration Classes)
  14. 第 14 篇 SpringBoot 官方文档翻译 14 — 自动配置 (Auto-configuration)
  15. 第 15 篇 SpringBoot 官方文档翻译 15 — Spring Bean 与依赖注入 (Spring Beans and Dependency Injection)
  16. 第 16 篇 SpringBoot 官方文档翻译 16 — 使用 @SpringBootApplication 注解
  17. 第 17 篇 SpringBoot 官方文档翻译 17 — 运行你的应用 (Running Your Application)
  18. 第 18 篇 SpringBoot 官方文档翻译 18 — 开发工具 (Developer Tools)
  19. 第 19 篇 SpringBoot 官方文档翻译 19 — 为生产打包应用
  20. 第 20 篇 SpringBoot 官方文档翻译 20 — 核心特性 (Core Features)
  21. 第 21 篇 SpringBoot 官方文档翻译 21 — SpringApplication
  22. 第 22 篇 SpringBoot 官方文档翻译 22 — 外部化配置 (Externalized Configuration)
  23. 第 23 篇 SpringBoot 官方文档翻译 23 — Profile
  24. 第 24 篇 SpringBoot 官方文档翻译 24 — 日志 (Logging)
  25. 第 25 篇 SpringBoot 官方文档翻译 25 — 国际化 (Internationalization)
  26. 第 26 篇 SpringBoot 官方文档翻译 26 — 面向切面编程 (AOP)
  27. 第 27 篇 SpringBoot 官方文档翻译 27 — JSON
  28. 第 28 篇 SpringBoot 官方文档翻译 28 — 任务执行与调度 (Task Execution and Scheduling)
  29. 第 29 篇 SpringBoot 官方文档翻译 29 — 开发时服务 (Development-time Services)
  30. 第 30 篇 SpringBoot 官方文档翻译 30 — 创建你自己的自动配置 (Creating Your Own Auto-configuration)
  31. 第 31 篇 SpringBoot 官方文档翻译 31 — Kotlin 支持 (Kotlin Support)
  32. 第 32 篇 SpringBoot 官方文档翻译 32 — SSL
  33. 第 33 篇 SpringBoot 官方文档翻译 33 — Web
  34. 第 34 篇 SpringBoot 官方文档翻译 34 — Servlet Web 应用 (Servlet Web Applications)
  35. 第 35 篇 SpringBoot 官方文档翻译 35 — 响应式 Web 应用 (Reactive Web Applications)
  36. 第 36 篇 SpringBoot 官方文档翻译 36 — 优雅关闭 (Graceful Shutdown)
  37. 第 37 篇 SpringBoot 官方文档翻译 37 — Spring Security
  38. 第 38 篇 SpringBoot 官方文档翻译 38 — Spring Session
  39. 第 39 篇 SpringBoot 官方文档翻译 39 — Spring for GraphQL
  40. 第 40 篇 SpringBoot 官方文档翻译 40 — Spring HATEOAS
  41. 第 41 篇 SpringBoot 官方文档翻译 41 — 数据 (Data)
  42. 第 42 篇 SpringBoot 官方文档翻译 42 — SQL 数据库 (SQL Databases)
  43. 第 43 篇 SpringBoot 官方文档翻译 43 — 使用 NoSQL 技术 (Working with NoSQL Technologies)
  44. 第 44 篇 SpringBoot 官方文档翻译 44 — IO
  45. 第 45 篇 SpringBoot 官方文档翻译 45 — 缓存 (Caching)
  46. 第 46 篇 SpringBoot 官方文档翻译 46 — Spring Batch
  47. 第 47 篇 SpringBoot 官方文档翻译 47 — gRPC
  48. 第 48 篇 SpringBoot 官方文档翻译 48 — Hazelcast
  49. 第 49 篇 SpringBoot 官方文档翻译 49 — Quartz Scheduler
  50. 第 50 篇 SpringBoot 官方文档翻译 50 — 发送电子邮件 (Sending Email)
  51. 第 51 篇 SpringBoot 官方文档翻译 51 — 校验 (Validation)
  52. 第 52 篇 SpringBoot 官方文档翻译 52 — 调用 REST 服务 (Calling REST Services)
  53. 第 53 篇 SpringBoot 官方文档翻译 53 — Web Services
  54. 第 54 篇 SpringBoot 官方文档翻译 54 — 使用 JTA 的分布式事务
  55. 第 55 篇 SpringBoot 官方文档翻译 55 — 消息 (Messaging)
  56. 第 56 篇 SpringBoot 官方文档翻译 56 — JMS
  57. 第 57 篇 SpringBoot 官方文档翻译 57 — AMQP
  58. 第 58 篇 SpringBoot 官方文档翻译 58 — Apache Kafka 支持
  59. 第 59 篇 SpringBoot 官方文档翻译 59 — Apache Pulsar 支持
  60. 第 60 篇 SpringBoot 官方文档翻译 60 — RSocket
  61. 第 61 篇 SpringBoot 官方文档翻译 61 — Spring Integration
  62. 第 62 篇 SpringBoot 官方文档翻译 62 — WebSockets
  63. 第 63 篇 SpringBoot 官方文档翻译 63 — 安全 (Security)
  64. 第 64 篇 SpringBoot 官方文档翻译 64 — OAuth2
  65. 第 65 篇 SpringBoot 官方文档翻译 65 — SAML 2.0
  66. 第 66 篇 SpringBoot 官方文档翻译 66 — 测试 (Testing)
  67. 第 67 篇 SpringBoot 官方文档翻译 67 — 测试模块 (Test Modules)
  68. 第 68 篇 SpringBoot 官方文档翻译 68 — 测试作用域依赖
  69. 第 69 篇 SpringBoot 官方文档翻译 69 — 测试 Spring 应用
  70. 第 70 篇 SpringBoot 官方文档翻译 70 — 测试 Spring Boot 应用
  71. 第 71 篇 SpringBoot 官方文档翻译 71 — Testcontainers
  72. 第 72 篇 SpringBoot 官方文档翻译 72 — 测试实用工具 (Test Utilities)
  73. 第 73 篇 SpringBoot 官方文档翻译 73 — 打包 Spring Boot 应用
  74. 第 74 篇 SpringBoot 官方文档翻译 74 — 高效部署
  75. 第 75 篇 SpringBoot 官方文档翻译 75 — AOT 缓存
  76. 第 76 篇 SpringBoot 官方文档翻译 76 — JVM 提前处理
  77. 第 77 篇 SpringBoot 官方文档翻译 77 — GraalVM 原生镜像
  78. 第 78 篇 SpringBoot 官方文档翻译 78 — 介绍 GraalVM 原生镜像
  79. 第 79 篇 SpringBoot 官方文档翻译 79 — 高级原生镜像主题
  80. 第 80 篇 SpringBoot 官方文档翻译 80 — JVM 检查点与恢复
  81. 第 81 篇 SpringBoot 官方文档翻译 81 — 容器镜像
  82. 第 82 篇 SpringBoot 官方文档翻译 82 — 高效容器镜像
  83. 第 83 篇 SpringBoot 官方文档翻译 83 — Dockerfile
  84. 第 84 篇 SpringBoot 官方文档翻译 84 — Cloud Native Buildpacks
  85. 第 85 篇 SpringBoot 官方文档翻译 85 — 生产就绪特性
  86. 第 86 篇 SpringBoot 官方文档翻译 86 — 启用生产就绪特性
  87. 第 87 篇 SpringBoot 官方文档翻译 87 — 端点 (Endpoints)
  88. 第 88 篇 SpringBoot 官方文档翻译 88 — 通过 HTTP 监控与管理
  89. 第 89 篇 SpringBoot 官方文档翻译 89 — 通过 JMX 监控与管理
  90. 第 90 篇 SpringBoot 官方文档翻译 90 — 可观测性 (Observability)
  91. 第 91 篇 SpringBoot 官方文档翻译 91 — 日志(Actuator)
  92. 第 92 篇 SpringBoot 官方文档翻译 92 — 指标 (Metrics)
  93. 第 93 篇 SpringBoot 官方文档翻译 93 — 追踪 (Tracing)
  94. 第 94 篇 SpringBoot 官方文档翻译 94 — 审计
  95. 第 95 篇 SpringBoot 官方文档翻译 95 — 记录 HTTP 交换
  96. 第 96 篇 SpringBoot 官方文档翻译 96 — 进程监控
  97. 第 97 篇 SpringBoot 官方文档翻译 97 — Cloud Foundry 支持
  98. 第 98 篇 SpringBoot 官方文档翻译 98 — How-to 指南
  99. 第 99 篇 SpringBoot 官方文档翻译 99 — Spring Boot 应用
  100. 第 100 篇 SpringBoot 官方文档翻译 100 — 属性与配置
  101. 第 101 篇 SpringBoot 官方文档翻译 101 — 嵌入式 Web 服务器
  102. 第 102 篇 SpringBoot 官方文档翻译 102 — Spring MVC
  103. 第 103 篇 SpringBoot 官方文档翻译 103 — Jersey
  104. 第 104 篇 SpringBoot 官方文档翻译 104 — HTTP 客户端
  105. 第 105 篇 SpringBoot 官方文档翻译 105 — 日志
  106. 第 106 篇 SpringBoot 官方文档翻译 106 — 数据访问
  107. 第 107 篇 SpringBoot 官方文档翻译 107 — 数据库初始化
  108. 第 108 篇 SpringBoot 官方文档翻译 108 — NoSQL
  109. 第 109 篇 SpringBoot 官方文档翻译 109 — 消息
  110. 第 110 篇 SpringBoot 官方文档翻译 110 — 批处理应用
  111. 第 111 篇 SpringBoot 官方文档翻译 111 — Actuator
  112. 第 112 篇 SpringBoot 官方文档翻译 112 — 安全
  113. 第 113 篇 SpringBoot 官方文档翻译 113 — 热交换
  114. 第 114 篇 SpringBoot 官方文档翻译 114 — 测试
  115. 第 115 篇 SpringBoot 官方文档翻译 115 — 构建
  116. 第 116 篇 SpringBoot 官方文档翻译 116 — 提前处理
  117. 第 117 篇 SpringBoot 官方文档翻译 117 — GraalVM 原生应用
  118. 第 118 篇 SpringBoot 官方文档翻译 118 — 开发第一个 GraalVM 原生应用
  119. 第 119 篇 SpringBoot 官方文档翻译 119 — 测试 GraalVM 原生镜像
  120. 第 120 篇 SpringBoot 官方文档翻译 120 — AOT 缓存
  121. 第 121 篇 SpringBoot 官方文档翻译 121 — 部署 Spring Boot 应用
  122. 第 122 篇 SpringBoot 官方文档翻译 122 — 传统部署
  123. 第 123 篇 SpringBoot 官方文档翻译 123 — 部署到云
  124. 第 124 篇 SpringBoot 官方文档翻译 124 — 安装 Spring Boot 应用
  125. 第 125 篇 SpringBoot 官方文档翻译 125 — Docker Compose
  126. 第 126 篇 SpringBoot 官方文档翻译 126 — 构建工具插件
  127. 第 127 篇 SpringBoot 官方文档翻译 127 — Maven 插件
  128. 第 128 篇 SpringBoot 官方文档翻译 128 — Maven 插件入门
  129. 第 129 篇 SpringBoot 官方文档翻译 129 — 使用 Maven 插件
  130. 第 130 篇 SpringBoot 官方文档翻译 130 — Maven 插件目标
  131. 第 131 篇 SpringBoot 官方文档翻译 131 — Maven 打包可执行归档
  132. 第 132 篇 SpringBoot 官方文档翻译 132 — Maven 打包 OCI 镜像
  133. 第 133 篇 SpringBoot 官方文档翻译 133 — 使用 Maven 运行应用
  134. 第 134 篇 SpringBoot 官方文档翻译 134 — Maven 提前处理
  135. 第 135 篇 SpringBoot 官方文档翻译 135 — Maven 运行集成测试
  136. 第 136 篇 SpringBoot 官方文档翻译 136 — Maven 与 Actuator 集成
  137. 第 137 篇 SpringBoot 官方文档翻译 137 — Maven 帮助信息
  138. 第 138 篇 SpringBoot 官方文档翻译 138 — Gradle 插件
  139. 第 139 篇 SpringBoot 官方文档翻译 139 — Gradle 插件入门
  140. 第 140 篇 SpringBoot 官方文档翻译 140 — Gradle 依赖管理
  141. 第 141 篇 SpringBoot 官方文档翻译 141 — Gradle 打包可执行归档
  142. 第 142 篇 SpringBoot 官方文档翻译 142 — Gradle 打包 OCI 镜像
  143. 第 143 篇 SpringBoot 官方文档翻译 143 — Gradle 发布应用
  144. 第 144 篇 SpringBoot 官方文档翻译 144 — 使用 Gradle 运行应用
  145. 第 145 篇 SpringBoot 官方文档翻译 145 — Gradle 提前处理
  146. 第 146 篇 SpringBoot 官方文档翻译 146 — Gradle 与 Actuator 集成
  147. 第 147 篇 SpringBoot 官方文档翻译 147 — Gradle 对其他插件的反应
  148. 第 148 篇 SpringBoot 官方文档翻译 148 — Spring Boot AntLib 模块
  149. 第 149 篇 SpringBoot 官方文档翻译 149 — 支持其他构建系统
  150. 第 150 篇 SpringBoot 官方文档翻译 150 — Spring Boot CLI
  151. 第 151 篇 SpringBoot 官方文档翻译 151 — 安装 CLI
  152. 第 152 篇 SpringBoot 官方文档翻译 152 — 使用 CLI
  153. 第 153 篇 SpringBoot 官方文档翻译 153 — Actuator REST API
  154. 第 154 篇 SpringBoot 官方文档翻译 154 — Actuator API: 审计事件 (auditevents)
  155. 第 155 篇 SpringBoot 官方文档翻译 155 — Actuator API: Bean (beans)
  156. 第 156 篇 SpringBoot 官方文档翻译 156 — Actuator API: 缓存 (caches)
  157. 第 157 篇 SpringBoot 官方文档翻译 157 — Actuator API: 条件评估报表 (conditions)
  158. 第 158 篇 SpringBoot 官方文档翻译 158 — Actuator API: 配置属性 (configprops)
  159. 第 159 篇 SpringBoot 官方文档翻译 159 — Actuator API: 环境 (env)
  160. 第 160 篇 SpringBoot 官方文档翻译 160 — Actuator API: Flyway (flyway)
  161. 第 161 篇 SpringBoot 官方文档翻译 161 — Actuator API: 健康 (health)
  162. 第 162 篇 SpringBoot 官方文档翻译 162 — Actuator API: 堆转储 (heapdump)
  163. 第 163 篇 SpringBoot 官方文档翻译 163 — Actuator API: HTTP 交换 (httpexchanges)
  164. 第 164 篇 SpringBoot 官方文档翻译 164 — Actuator API: 应用信息 (info)
  165. 第 165 篇 SpringBoot 官方文档翻译 165 — Actuator API: Spring Integration 图 (integrationgraph)
  166. 第 166 篇 SpringBoot 官方文档翻译 166 — Actuator API: Liquibase (liquibase)
  167. 第 167 篇 SpringBoot 官方文档翻译 167 — Actuator API: 日志文件 (logfile)
  168. 第 168 篇 SpringBoot 官方文档翻译 168 — Actuator API: Loggers (loggers)
  169. 第 169 篇 SpringBoot 官方文档翻译 169 — Actuator API: 映射 (mappings)
  170. 第 170 篇 SpringBoot 官方文档翻译 170 — Actuator API: 指标 (metrics)
  171. 第 171 篇 SpringBoot 官方文档翻译 171 — Actuator API: Prometheus (prometheus)
  172. 第 172 篇 SpringBoot 官方文档翻译 172 — Actuator API: Quartz (quartz)
  173. 第 173 篇 SpringBoot 官方文档翻译 173 — Actuator API: 软件物料清单 (sbom)
  174. 第 174 篇 SpringBoot 官方文档翻译 174 — Actuator API: 计划任务 (scheduledtasks)
  175. 第 175 篇 SpringBoot 官方文档翻译 175 — Actuator API: 会话 (sessions)
  176. 第 176 篇 SpringBoot 官方文档翻译 176 — Actuator API: 关闭 (shutdown)
  177. 第 177 篇 SpringBoot 官方文档翻译 177 — Actuator API: 应用启动 (startup)
  178. 第 178 篇 SpringBoot 官方文档翻译 178 — Actuator API: 线程转储 (threaddump)
  179. 第 179 篇 SpringBoot 官方文档翻译 179 — Spring Boot Java API
  180. 第 180 篇 SpringBoot 官方文档翻译 180 — Gradle Plugin Java API
  181. 第 181 篇 SpringBoot 官方文档翻译 181 — Maven Plugin Java API
  182. 第 182 篇 SpringBoot 官方文档翻译 182 — Spring Boot Kotlin API
  183. 第 183 篇 SpringBoot 官方文档翻译 183 — 配置元数据
  184. 第 184 篇 SpringBoot 官方文档翻译 184 — 元数据格式
  185. 第 185 篇 SpringBoot 官方文档翻译 185 — 提供手动提示
  186. 第 186 篇 SpringBoot 官方文档翻译 186 — 使用注解处理器生成元数据
  187. 第 187 篇 SpringBoot 官方文档翻译 187 — 可执行 Jar 格式
  188. 第 188 篇 SpringBoot 官方文档翻译 188 — 嵌套 JAR
  189. 第 189 篇 SpringBoot 官方文档翻译 189 — NestedJarFile 类
  190. 第 190 篇 SpringBoot 官方文档翻译 190 — 启动可执行 Jar
  191. 第 191 篇 SpringBoot 官方文档翻译 191 — PropertiesLauncher 特性
  192. 第 192 篇 SpringBoot 官方文档翻译 192 — 可执行 Jar 限制
  193. 第 193 篇 SpringBoot 官方文档翻译 193 — 替代的单一 Jar 方案
  194. 第 194 篇 SpringBoot 官方文档翻译 194 — 常见应用属性
  195. 第 195 篇 SpringBoot 官方文档翻译 195 — 已弃用的应用属性
  196. 第 196 篇 SpringBoot 官方文档翻译 196 — 自动配置类
  197. 第 197 篇 SpringBoot 官方文档翻译 197 — 测试自动配置注解
  198. 第 198 篇 SpringBoot 官方文档翻译 198 — 测试切片
  199. 第 199 篇 SpringBoot 官方文档翻译 199 — 依赖版本
  200. 第 200 篇 SpringBoot 官方文档翻译 200 — 管理的依赖坐标
  201. 第 201 篇 SpringBoot 官方文档翻译 201 — 版本属性
  202. 第 202 篇 SpringBoot 官方文档翻译 202 — 自动配置类: spring-boot-activemq
  203. 第 203 篇 SpringBoot 官方文档翻译 203 — 自动配置类: spring-boot-actuator-autoconfigure
  204. 第 204 篇 SpringBoot 官方文档翻译 204 — 自动配置类: spring-boot-amqp
  205. 第 205 篇 SpringBoot 官方文档翻译 205 — 自动配置类: spring-boot-amqp-rabbitmq
  206. 第 206 篇 SpringBoot 官方文档翻译 206 — 自动配置类: spring-boot-artemis
  207. 第 207 篇 SpringBoot 官方文档翻译 207 — 自动配置类: spring-boot-autoconfigure
  208. 第 208 篇 SpringBoot 官方文档翻译 208 — 自动配置类: spring-boot-batch
  209. 第 209 篇 SpringBoot 官方文档翻译 209 — 自动配置类: spring-boot-batch-data-mongodb
  210. 第 210 篇 SpringBoot 官方文档翻译 210 — 自动配置类: spring-boot-batch-jdbc
  211. 第 211 篇 SpringBoot 官方文档翻译 211 — 自动配置类: spring-boot-cache

RESPONSES / LOG

读者来信 / RESPONSES

发表评论

评论需审核后展示。

暂无评论