Micronaut test conditional beans

﹥>﹥吖頭↗ 提交于 2019-12-24 10:47:29

问题


I'm working on and micronaut application, and I want to test a production bean. I have a bean that is conditional using @Requires(env="production" and another that loads when @Requires(notEnv="production") that is a simple mock of production. Is there a way in micronaut to mock enviroment so the production bean is created so that I can test it?

来源:https://stackoverflow.com/questions/56936903/micronaut-test-conditional-beans

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!