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)
- After upgrading Spring Boot from 3.1.5 to 3.2.0 properties from application.yml are not read HOT 4
- Clarify that all named properties must match for @ConditionalOnProperty to match
- Clarify that all named properties must match for @ConditionalOnProperty to match
- Spring boot 3.2.5 crash if call wrong method HOT 5
- server.error.include-binding-errors does not recognize MethodValidationResult exceptions
- Stop expecting deprecation warnings in NativeImagePluginActionIntegrationTests
- Stop expecting deprecation warnings in NativeImagePluginActionIntegrationTests
- Add a test that verifies that the default for spring.data.mongodb.uuid-representation is aligned with Spring Data's default
- Add a test that verifies that the default for spring.data.mongodb.uuid-representation is aligned with Spring Data's default
- ServiceLevelObjectiveBoundary properties cannot be bound in a native image application
- Suggest testAndDevelopmentOnly configuration when using Docker Compose support in tests
- ServiceLevelObjectiveBoundary properties cannot be bound in a native image application
- ServiceLevelObjectiveBoundary properties cannot be bound in a native image application
- Runtime hint registration for property binding should not fail when parameter information is unavailable
- Runtime hint registration for property binding should not fail when parameter information is unavailable
- Bump gradle/actions from 3.3.0 to 3.3.1
- Bump gradle/actions from 3.3.0 to 3.3.1
- Consider delaying Jackson 2.17.0 upgrade in Spring Boot 3.3.0 HOT 2
- <springProperty> does not work in <include> after Logback upgrade HOT 5
- PulsarPropertiesMapper.getAuthenticationParamsJson HOT 6
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.