我需要在我的春季引导应用程序FF4j。我试着
<dependency>
<groupId>org.ff4j</groupId>
<artifactId>ff4j-spring-boot-starter</artifactId>
<version>1.8</version>
</dependency>在这种情况下,我的应用程序会因为自大而中断。
我可以将org.ff4j.spring.boot.web.api.config.SwaggerConfig排除在配置之外吗?
我试图管理它,但由于新的不同问题,无法达成最终的解决方案。
发布于 2019-04-03 11:11:40
如果您在应用程序中配置swagger (通常情况下),由于不同的原因,它将失败。可能的下一个方案:
api;Docket bean在相同的春季上下文中发生冲突;1. Firstly I tried to exclude `ff4j-spring` auto configuration configuring steps in similar way but excluding `swagger` for example. Application can't start `ff4j` without their swagger. That's confused a lot.
2. Looking different solutions I tried follow some recommendations [like](https://github.com/ff4j/ff4j-spring-boot-starter-parent/issues/27#issuecomment-466533139) but I'm getting different issue with missed class for my application. Missed class is in `thymeleaf5`. I can't use `thymeleaf5` because of it uses same name interface but different arguments. Additional workarounds make my application failed because of hibernate.
昂首阔步的解决办法是:
在您的配置中从swagger Docket注入ff4j
@Autowired
Docket api;并在api块中用您的配置重写@PostConstruct。这个解决方案并不优雅,但为傲慢的吐露提供了修正。
@PostConstruct
public void reconfigureSwagger() {
api....
}附注:
在大摇大摆之后,我得到了更多未解决的元素(但这将是一个不同的问题)。
P.S.2.
FF4j库提供了很好的UI和思想,这就是为什么我不能避免它的头痛的一般原因。
https://stackoverflow.com/questions/55460707
复制相似问题