英文:
Maven: How can I verify that all beans are created and initialized
问题
如何验证所有的Bean都被创建和初始化?
我注意到,即使有一些Bean创建失败,maven clean install
也是成功的。
英文:
How can I verify that all beans are created and initialized?
I've noticed, that maven clean install
is successful even if I have some failed beans
答案1
得分: 1
你可以进行一项测试,尝试加载包含所有Bean的整个上下文。您可以查阅关于@SpringBootTest的相关信息(考虑您正在使用Spring)。
英文:
You can have a test that tries to load the whole context with all the beans. You can look up about @SpringBootTest(considering you are using Spring)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论