Comments (3)
This due to a few mistakes in your configuration. I've forked the sample and pushed a commit with comments describing the changes that need to be made and why.
from spring-boot.
Hi, @wilkinsona
Thank you for your quick response and detailed explanation. 2 points still confused me: (Problem solved.)
1. As I commented in your commit, I didn't understand why all of the nested conditions use the parse configuration phase
.
2. When using @Import
annotation, @ConditionalOnClass and AllNestedConditions have same behavior. But when using META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
, they behave different. I updated the sample project, please take a look: https://github.com/rujche/problem-reproduce/tree/ConditionalOnClass-not-work-as-expected-when-added-in-AllNestedConditions
from spring-boot.
Hi, @wilkinsona
Thank you for your quick response and detailed explanation. 2 points still confused me:
- As I commented in your commit, I didn't understand why
all of the nested conditions use the parse configuration phase
.- When using
@Import
annotation, @ConditionalOnClass and AllNestedConditions have same behavior. But when usingMETA-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
, they behave different. I updated the sample project, please take a look: https://github.com/rujche/problem-reproduce/tree/ConditionalOnClass-not-work-as-expected-when-added-in-AllNestedConditions
Update:
- About point 1, I already got the answer.
- About point 2, I updated the sample to Use PARSE_CONFIGURATION to make FirstAutoConfiguration and SecondAutoConfiguration have same behavior. Thank you all the same.
from spring-boot.
Related Issues (20)
- Fix documentation links in the README
- Fix documentation links in the README
- Add support for CNB platform API version 0.14
- Constructor binding of EnumMap fails due to missing key type HOT 2
- DynamicPropertyRegistry Values Not Set After Dev Tools Reload for RestartScope Containers
- Upgrade to Spring RESTDocs 3.0.2
- Upgrade to Spring Framework 6.2.0-M6
- Spring Boot 2 datasource can not run with Dockerfile HOT 4
- ClassNotFoundException in JSP compiler after update from Spring Boot 3.3.1 -> 3.3.2 HOT 6
- Broken documentation links HOT 2
- java.lang.LinkageError: loader 'app' attempted duplicate class definition for jakarta.persistence.TemporalType HOT 1
- Has the loading order of springboot3 beans changed? HOT 1
- Wait until spring-boot.rb file is available when updating Homebrew tap
- Spring Boot profiles not respected when fetching configuration files from Spring Cloud Config after native build HOT 7
- Constructor binding of EnumMap fails due to missing key type
- Constructor binding of EnumMap fails due to missing key type
- Use Spring SSL bundle in SAML2 signing
- RestClient.Builder vs RestClientAutoConfiguration's Implementation HOT 2
- wrong docs on Security auto configuration, custom SecurityFilterChain and Actuator Security?
- Disable automatic creation of observation on some scheduled tasks HOT 3
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.