mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '1.5.x'
This commit is contained in:
commit
797ad13bfa
@ -37,8 +37,9 @@ import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator;
|
||||
* @author Andreas Ahlenstorf
|
||||
* @author Phillip Webb
|
||||
* @author Stephane Nicoll
|
||||
* @author 1.5.10
|
||||
*/
|
||||
class JooqExceptionTranslator extends DefaultExecuteListener {
|
||||
public class JooqExceptionTranslator extends DefaultExecuteListener {
|
||||
|
||||
// Based on the jOOQ-spring-example from https://github.com/jOOQ/jOOQ
|
||||
|
||||
|
@ -30,14 +30,15 @@ import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||
* @author Lukas Eder
|
||||
* @author Andreas Ahlenstorf
|
||||
* @author Phillip Webb
|
||||
* @since 1.5.10
|
||||
*/
|
||||
class SpringTransactionProvider implements TransactionProvider {
|
||||
public class SpringTransactionProvider implements TransactionProvider {
|
||||
|
||||
// Based on the jOOQ-spring-example from https://github.com/jOOQ/jOOQ
|
||||
|
||||
private final PlatformTransactionManager transactionManager;
|
||||
|
||||
SpringTransactionProvider(PlatformTransactionManager transactionManager) {
|
||||
public SpringTransactionProvider(PlatformTransactionManager transactionManager) {
|
||||
this.transactionManager = transactionManager;
|
||||
}
|
||||
|
||||
|
@ -698,7 +698,7 @@ content into your application. Rather, pick only the properties that you need.
|
||||
spring.influx.url= # URL of the InfluxDB instance to which to connect.
|
||||
spring.influx.user= # Login user.
|
||||
|
||||
# JOOQ ({sc-spring-boot-autoconfigure}/jooq/JooqAutoConfiguration.{sc-ext}[JooqAutoConfiguration])
|
||||
# JOOQ ({sc-spring-boot-autoconfigure}/jooq/JooqProperties.{sc-ext}[JooqProperties])
|
||||
spring.jooq.sql-dialect= # SQL dialect to use. Auto-detected by default.
|
||||
|
||||
# JDBC ({sc-spring-boot-autoconfigure}/jdbc/JdbcProperties.{sc-ext}[JdbcProperties])
|
||||
|
@ -1953,6 +1953,19 @@ include::{code-examples}/elasticsearch/HibernateSearchElasticsearchExample.java[
|
||||
|
||||
|
||||
|
||||
[[howto-configure-a-component-that-is-used-by-JPA]]
|
||||
=== Configure jOOQ with Two DataSources
|
||||
If you need to use jOOQ with multiple data sources, you should create your own
|
||||
`DSLContext` for each, refer to
|
||||
{sc-spring-boot-autoconfigure}/jooq/JooqAutoConfiguration.{sc-ext}[JooqAutoConfiguration]
|
||||
for more details.
|
||||
|
||||
TIP: In particular, `JooqExceptionTranslator` and `SpringTransactionProvider` can be
|
||||
reused to provide similar features to what the auto-configuration does with a single
|
||||
`DataSource`.
|
||||
|
||||
|
||||
|
||||
[[howto-database-initialization]]
|
||||
== Database Initialization
|
||||
An SQL database can be initialized in different ways depending on what your stack is.
|
||||
|
Loading…
Reference in New Issue
Block a user