Files
spring-boot-demo/custom-starter/output/07-conditional-on-class-on-a-bean-method.txt
T
Claude c418589251 Add custom-starter module: a Boot 4 auto-configuration starter with conditions, metadata and runner tests
Two-jar starter (autoconfigure + starter), a demo app, and 17 captured transcripts
covering AutoConfiguration.imports, @ConditionalOn*, ordering, optional Jackson 3
integration, configuration metadata and the Boot 4 module split.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Uu7q8vPeREyT4218EJPzz1
2026-09-24 06:53:07 +00:00

13 lines
653 B
Plaintext

# @ConditionalOnClass(JsonMapper.class) on a @Bean method, versus on a nested class, with and without Jackson
--- condition on the @Bean method, classpath without any Jackson jar ---
context failed
exception chain: BeanDefinitionStoreException -> IllegalStateException -> NoClassDefFoundError -> ClassNotFoundException
root cause : java.lang.ClassNotFoundException: tools.jackson.databind.module.SimpleModule
--- condition on a nested class, classpath without any Jackson jar ---
context started; nestedModule bean present: false
--- condition on the @Bean method, classpath with Jackson ---
context started; methodLevelModule bean present: true