featureflags

FeatureFlags for Spring Boot

License

License

GroupId

GroupId

io.github.akayibrahim
ArtifactId

ArtifactId

featureflags
Last Version

Last Version

1.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

featureflags
FeatureFlags for Spring Boot
Project URL

Project URL

http://maven.apache.org
Project Organization

Project Organization

Pivotal Software, Inc.
Source Code Management

Source Code Management

https://github.com/akayibrahim/featureflags

Download featureflags

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.akayibrahim/featureflags/ -->
<dependency>
    <groupId>io.github.akayibrahim</groupId>
    <artifactId>featureflags</artifactId>
    <version>1.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.akayibrahim/featureflags/
implementation 'io.github.akayibrahim:featureflags:1.0.4'
// https://jarcasting.com/artifacts/io.github.akayibrahim/featureflags/
implementation ("io.github.akayibrahim:featureflags:1.0.4")
'io.github.akayibrahim:featureflags:jar:1.0.4'
<dependency org="io.github.akayibrahim" name="featureflags" rev="1.0.4">
  <artifact name="featureflags" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.akayibrahim', module='featureflags', version='1.0.4')
)
libraryDependencies += "io.github.akayibrahim" % "featureflags" % "1.0.4"
[io.github.akayibrahim/featureflags "1.0.4"]

Dependencies

compile (3)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-web jar 2.3.1.RELEASE
org.springframework.boot : spring-boot-starter-test jar 2.3.1.RELEASE
org.aspectj : aspectjweaver jar 1.9.5

Project Modules

There are no modules declared in this project.

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

<dependency>
   <groupId>io.github.akayibrahim</groupId>
   <artifactId>featureflags</artifactId>
   <version>1.0.4</version>
</dependency>

2 . Add below import annotation to your spring boot main class. @Import(FeatureFlags.class)

Example usage:

@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.

@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)

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.

Versions

Version
1.0.4
1.0.3
1.0.1
1.0.0