简体   繁体   English

如何在没有 xml 的情况下使用 FF4J 获取 java 中的功能

[英]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.

相关问题 FF4j Web 控制台未正确显示 - FF4j Web console is not displayed properly spring 引导项目中的 FF4J 配置错误 - Error with FF4J configuration in spring boot project ff4j kotlin 无法创建表抛出 BadSqlGrammarException - ff4j kotlin cannot create table throws BadSqlGrammarException FF4J - Spring Boot - 自定义授权管理器 - FF4J - Spring Boot - Custom Authorization Manager FF4J:特征存储的服务器端缓存 - FF4J: server side caching for feature store FF4j + MS SQL:获取“操作数类型冲突 datetime2 与时间戳不兼容”异常 - FF4j + MS SQL : Getting "operand type clash datetime2 is incompatible with timestamp" Exception FF4J:FeatureStoreHttp 抛出 NoClassDefFoundError:javax/ws/rs/client/RxInvokerProvider - FF4J: FeatureStoreHttp throws NoClassDefFoundError : javax/ws/rs/client/RxInvokerProvider 如何获取AWS Lambda和Spring Boot 2.1.5以使用Log4j2.xml并登录到Cloudwatch? - How can I get AWS Lambda and Spring Boot 2.1.5 to use Log4j2.xml and log to Cloudwatch? 如何在没有 xml 的 Java 配置中使用具有不同数据和两个 JdbcBatchItemWritter 的 Spring 批处理 CompositeItemWriter - How to use Spring batch CompositeItemWriter with different data and having two JdbcBatchItemWritter and in Java configurations without xml 如何在没有xml的情况下使用spring boot 2和ehcache 3? - How to use spring boot 2 and ehcache 3 without xml?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM