[英]How to use FF4J to get the features in java without xml
We are using the FF4J Framework to toggle features in our spring boot application.我们正在使用 FF4J 框架来切换 spring 引导应用程序中的功能。 we manage features using the web console ( Insert/update new features into the DB) that it provides but to use the toggling in java, we are using spring AOP ( @Flip
annotation) which uses the XML file, so in this case, we will have to manage the feature flags in the database and also in the XML files. we manage features using the web console ( Insert/update new features into the DB) that it provides but to use the toggling in java, we are using spring AOP ( @Flip
annotation) which uses the XML file, so in this case, we必须管理数据库和 XML 文件中的功能标志。 Is there any other way in which I can use ff4j in java without XML ( would be better if its annotation-based as it's easy to manage the code) and rather read from the DB in our spring boot application有没有其他方法可以在没有 XML 的情况下在 java 中使用 ff4j (如果它基于注释会更好,因为它易于管理代码),而是从我们的 Z2A2D595E6ED9A0B24D6B02 应用程序中的数据库读取
Also, in the front end angular application, we are using the API ( /api/ff4j/store/features) that it provides to get the features此外,在前端 angular 应用程序中,我们使用它提供的 API ( /api/ff4j/store/features) 来获取功能
I don't know much about ff4J, seems like very old way of doing dynamic properties, we use Apache Zookeeper to achieve this and we pass necessary values to our front end depending on the endpoints.我对 ff4J 不太了解,这似乎是一种非常古老的动态属性方式,我们使用 Apache Zookeeper 来实现这一点,并根据端点将必要的值传递给前端。
This is not a normal behaviour.这不是正常行为。 The @Flip
annotation works with the ff4j bean you defined in your application. @Flip
注释适用于您在应用程序中定义的 ff4j bean。 Look here at how it is injected here in the bean看这里是怎么注入到bean里的
In the application, you need to define a proper FF4j with same datastore as the console or it will use a default one.在应用程序中,您需要定义一个与控制台具有相同数据存储的适当 FF4j,否则它将使用默认存储。
Check this sample, will update soon with the @Flip
annotation class检查此示例,将很快更新@Flip
注释 class
https://github.com/ff4j/ff4j-samples/tree/master/spring-boot-2x/ff4j-sample-springboot2x https://github.com/ff4j/ff4j-samples/tree/master/spring-boot-2x/ff4j-sample-springboot2x
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.