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