Springboot 启动时Bean初始化,启动异常-Assert.isTrue(condition,message) 报错


Springboot 启动时Bean初始化启动异常Assert.isTrue(condition,message) 报错,如果 condition为false 则会出现

java.lang.IllegalArgumentException: message,

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘XXXXXX’ defined in class path resource 异常

总结: 

@Configuration 注解中定义bean, @Bean 如果Bean中出现异常则会立即抛出,终止springboot启动


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM