Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akayibrahim/featureflags
FeatureFlags for Spring Boot - Project 7
https://github.com/akayibrahim/featureflags
annotation easyfeaturetoggle featureflags java spring spring-boot springannotation springannotations springboot
Last synced: about 1 month ago
JSON representation
FeatureFlags for Spring Boot - Project 7
- Host: GitHub
- URL: https://github.com/akayibrahim/featureflags
- Owner: akayibrahim
- Created: 2020-10-19T19:39:17.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-15T09:07:26.000Z (about 4 years ago)
- Last Synced: 2024-11-15T06:52:26.890Z (about 2 months ago)
- Topics: annotation, easyfeaturetoggle, featureflags, java, spring, spring-boot, springannotation, springannotations, springboot
- Language: Java
- Homepage:
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Feature Flags Annotation for Spring (Java)
#### This project is for toggle off/on of java features.
**Follow steps:**
1 . Add below dependency to pom.xml of your project
```javaio.github.akayibrahim
featureflags
1.0.4```
2 . Add below import annotation to your spring boot main class.
`@Import(FeatureFlags.class)`Example usage:
```java
@SpringBootApplication
@Import(FeatureFlags.class)
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
```
3 . Now you are ready. You can add FeatureFlags annotation to your methods like below.
```java
@FeatureFlag(enabled = "featureFlags.demo")
@Override
public void demo() {
System.out.println("Demo Feature Flags");
}
```
4 . Don't forget add toggle parameter to your config file. (application.properties / application.yml)
```yaml
featureFlags:
demo: true
```NOTES:
- if your method has return object, don't forget null check when the method call.
- Feature Flags can not use for Aspect.