@groovy.transform.CompileStatic @org.springframework.boot.autoconfigure.AutoConfiguration @org.springframework.boot.autoconfigure.condition.ConditionalOnClass(value: MongoTemplate) @org.springframework.boot.autoconfigure.condition.ConditionalOnBean(value: MongoDatastore) @org.springframework.boot.autoconfigure.AutoConfigureAfter(name: org.grails.datastore.gorm.mongodb.boot.autoconfigure.MongoDbGormAutoConfiguration) class SpringDataMongoGormAutoConfiguration extends java.lang.Object
Auto-configuration that wires Spring Data MongoDB on top of the same MongoDatastore
(and therefore the same MongoClient, database and codecs) that GORM for MongoDB uses,
and registers a primary transaction manager that lets GORM and Spring Data operations share a
single MongoDB transaction.
Activates only when Spring Data MongoDB is on the classpath and a GORM MongoDatastore
bean is present. All beans are conditional on the application not already defining them, so an
application that configures its own MongoTemplate, factory or transaction manager wins.
| Constructor and description |
|---|
SpringDataMongoGormAutoConfiguration() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
MappingMongoConverter |
mappingMongoConverter(MongoDatabaseFactory databaseFactory, MongoMappingContext mappingContext, MongoCustomConversions conversions) |
|
MongoCustomConversions |
mongoCustomConversions() |
|
MongoDatabaseFactory |
mongoDatabaseFactory(MongoDatastore mongoDatastore) |
|
MongoTemplate |
mongoTemplate(MongoDatabaseFactory databaseFactory, MappingMongoConverter converter) |
|
MongoMappingContext |
springDataMongoMappingContext(MongoCustomConversions conversions) |
|
PlatformTransactionManager |
transactionManager(MongoDatastore mongoDatastore, MongoDatabaseFactory databaseFactory) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |