有时,我可能不需要根据通过JVM参数传递的值在启动时构建bean。
我尝试过@Conditional注释,但它只适用于@Bean注释。
你以前试过/需要过这样的东西吗?
发布于 2018-11-01 15:59:03
AFAIK条件不能与后置结构混合。所以我的建议
@Conditional@Profile中使用接近值,并将活动轮廓作为参数-Dspring.profiles.active=my_profilehttps://stackoverflow.com/questions/46560440
复制相似问题