Comments (1)
Unfortunately, it isn't practical to provide examples for every bean that's auto-configured showing how it can be overridden as it would make the documentation overly verbose. Instead, we prefer to take advantage of the fact that Spring Boot is open source and that you can use the condition evaluation report that see what is being auto-configured and why.
If you start an app that uses Spring Data MongoDB with --debug
, you'll see something similar to the following in the output:
============================
CONDITIONS EVALUATION REPORT
============================
Positive matches:
-----------------
…
MongoDataConfiguration#mongoCustomConversions matched:
- @ConditionalOnMissingBean (types: org.springframework.data.mongodb.core.convert.MongoCustomConversions; SearchStrategy: all) did not find any beans (OnBeanCondition)
From this you can learn that mongoCustomConversions
was auto-configured because there was no existing MongoCustomConversions
bean in the context. This means that it will back off if you define your own. You can also look at the problem from those other side and start with the auto-configuration classes that are listed in the appendix.
The benefit of this approach is that it is generally applicable to any auto-configuration. Thanks anyway for the suggestion but we feel that our current approach is more practical approach as it doesn't require individual examples in the reference documentation for every single different bean that Spring Boot can auto-configure.
from spring-boot.
Related Issues (20)
- Renew trust material for SSL tests
- Upgrade to antora-zip-contents-collector-extension 1.0.0-alpha.8
- JarUrlConnection.getPermission() can throw NullPointerException if jarFileConnection is null
- Remove reassignments for builders in GraphQL auto-configurations
- Remove reassignments for builders in GraphQL auto-configurations
- Renew trust material for SSL tests
- Help information for spring init's build option has the wrong default
- Help information for spring init's build option has the wrong default
- Clarify devtools restart class loader
- Clarify devtools restart class loader
- AnsiOutput.detectIfAnsiCapable broken on JDK22
- SAML2 autoconfiguration only supports unprotected private keys
- Avoid using ClientHttpRequestFactory which may not on the classpath
- resolveMainClassName fails when building with Gradle using Java 22
- Avoid using ClientHttpRequestFactory which may not on the classpath
- URISyntaxException is raised if the spring boot application is started in a location that contains invalid URI characters HOT 1
- URISyntaxException is raised if the spring boot application is started in a location that contains invalid URI characters
- Upgrade to GraphQL Java 22.0
- ActiveProfiles not used on SpringBootApplication even in test context HOT 1
- `@AutoConfigureWebTestClient` does not work on mock environment HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot.