mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Update readme
This commit is contained in:
@@ -6,6 +6,21 @@ Integration with Spring managed transactions.
|
||||
This project provides an Ebean `ExternalTransactionManager` specifically
|
||||
to integrate with Springs JDBC Transaction manager.
|
||||
|
||||
## To use
|
||||
|
||||
```java
|
||||
ServerConfig serverConfig = new ServerConfig();
|
||||
|
||||
// set SpringJdbcTransactionManager ... as the external transaction manager
|
||||
serverConfig.setExternalTransactionManager(new SpringJdbcTransactionManager());
|
||||
|
||||
...
|
||||
EbeanServer server = EbeanServerFactory.create(serverConfig);
|
||||
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
You can use Ebean in Spring/Spring Boot *without* this and that case Ebean
|
||||
manages the Transactions itself. With Ebean managing the transactions there
|
||||
are some benefits with more control over JDBC batch, getGeneratedKeys
|
||||
|
||||
Reference in New Issue
Block a user