[英]How to get the WebApplicationType of Springboot application at runtime?
I have a library that I use in reactive and non-reactive spring-boot applications.我有一个库,可用于反应式和非反应式 spring-boot 应用程序。 How can I within my library find out at runtime whether the application is REACTIVE or SERVLET?
如何在我的库中在运行时找出应用程序是 REACTIVE 还是 SERVLET?
You can use Java decompiler, such as可以使用Java反编译器,比如
http://www.javadecompilers.com/ http://www.javadecompilers.com/
http://java-decompiler.github.io/ http://java-decompiler.github.io/
You will see something like this你会看到这样的东西
(source: http://java-decompiler.github.io/ ) (来源: http://java-decompiler.github.io/ )
If you see these classes like https://projectreactor.io/docs/core/release/api/ then, it is Spring Boot Reactor project, and vice versace.如果你看到像https://projectreactor.io/docs/core/release/api/这样的类,那么它就是 Spring Boot Reactor 项目,反之亦然。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.