Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
java-version: 25
- name: Cache Maven dependencies
uses: actions/cache@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=25.0.3-tem
4 changes: 0 additions & 4 deletions ff4j-spring-boot-autoconfigure-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
<groupId>org.ff4j</groupId>
<artifactId>ff4j-core</artifactId>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ff4j-spring-boot-starter-webmvc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<artifactId>spring-boot-starter-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.ff4j</groupId>
Expand Down
8 changes: 7 additions & 1 deletion ff4j-spring-rest-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -85,7 +91,7 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<artifactId>spring-boot-starter-webmvc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import org.ff4j.services.domain.AuthorizationsManagerApiBean
import org.ff4j.services.domain.FF4jStatusApiBean
import org.ff4j.services.exceptions.FeatureNotFoundException
import org.ff4j.web.FF4jWebConstants.*
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.MediaType.APPLICATION_FORM_URLENCODED_VALUE
import org.springframework.http.MediaType.APPLICATION_JSON_VALUE
import org.springframework.http.ResponseEntity
Expand All @@ -47,7 +46,7 @@ import reactor.core.publisher.Mono
@Tag(name = "FF4J", description = "The API for global status of FF4J")
@RestController
@RequestMapping(value = ["\${ff4j.api.context-path:$RESOURCE_FF4J}"])
class FF4jResource(@Autowired val ff4JServices: FF4jServices) {
class FF4jResource(val ff4JServices: FF4jServices) {

@Operation(
summary = "Gets ff4j status overview",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import org.ff4j.services.domain.FeatureApiBean
import org.ff4j.spring.rest.api.utils.FeatureWebUtils
import org.ff4j.services.model.FeatureActions
import org.ff4j.web.FF4jWebConstants.*
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.HttpStatus.ACCEPTED
import org.springframework.http.MediaType.APPLICATION_JSON_VALUE
import org.springframework.http.ResponseEntity
Expand All @@ -52,7 +51,7 @@ import reactor.core.publisher.Mono
@Tag(name = "Feature", description = "The API for feature related operations")
@RestController
@RequestMapping(value = ["\${ff4j.api.context-path:$RESOURCE_FF4J}$RESOURCE_STORE$RESOURCE_FEATURES/$PATH_PARAM_UID"])
class FeatureResource(@Autowired val featureServices: FeatureServices) {
class FeatureResource(val featureServices: FeatureServices) {

@Operation(summary = "Get feature by uid", description = "Get feature by uid", tags = ["Feature"])
@ApiResponses(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import org.ff4j.services.domain.FeatureApiBean
import org.ff4j.services.domain.FeatureStoreApiBean
import org.ff4j.services.domain.GroupDescApiBean
import org.ff4j.web.FF4jWebConstants.*
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.HttpStatus.NO_CONTENT
import org.springframework.http.MediaType.APPLICATION_JSON_VALUE
import org.springframework.http.ResponseEntity
Expand All @@ -53,7 +52,7 @@ import reactor.core.publisher.Mono
@Tag(name = "FeatureStore", description = "The API for accessing the store of all features")
@RestController
@RequestMapping(value = ["\${ff4j.api.context-path:$RESOURCE_FF4J}$RESOURCE_STORE"])
class FeatureStoreResource(@Autowired val featureStoreService: FeatureStoreServices) {
class FeatureStoreResource(val featureStoreService: FeatureStoreServices) {

@Operation(summary = "Displays information regarding the FeaturesStore", tags = ["FeatureStore"])
@ApiResponses(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import org.ff4j.services.constants.FeatureConstants.RESOURCE_STORE
import org.ff4j.services.domain.FeatureApiBean
import org.ff4j.web.FF4jWebConstants.OPERATION_DISABLE
import org.ff4j.web.FF4jWebConstants.OPERATION_ENABLE
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.MediaType.APPLICATION_JSON_VALUE
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.*
Expand All @@ -47,7 +46,7 @@ import reactor.core.publisher.Flux
@Tag(name = "Groups", description = "The API for group related operations")
@RestController
@RequestMapping(value = ["\${ff4j.api.context-path:$RESOURCE_FF4J}$RESOURCE_STORE$RESOURCE_GROUPS/$PATH_PARAM_GROUP"])
class GroupResource(@Autowired val groupServices: GroupServices) {
class GroupResource(val groupServices: GroupServices) {

@Operation(summary = "Get all the features belonging to the group", tags = ["Groups"])
@ApiResponses(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import org.ff4j.services.constants.FeatureConstants.RESOURCE_MONITORING
import org.ff4j.services.domain.EventRepositoryApiBean
import org.ff4j.web.FF4jWebConstants.PARAM_END
import org.ff4j.web.FF4jWebConstants.PARAM_START
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.MediaType.APPLICATION_JSON_VALUE
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
Expand All @@ -47,7 +46,7 @@ import reactor.core.publisher.Mono
@Tag(name = "Monitoring", description = "The API for monitoring related operations")
@RestController
@RequestMapping(value = ["\${ff4j.api.context-path:$RESOURCE_FF4J}$RESOURCE_MONITORING"])
class MonitoringResource(@Autowired val monitoringServices: MonitoringServices) {
class MonitoringResource(val monitoringServices: MonitoringServices) {

@Operation(
summary = "Display Monitoring information for all features",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import org.ff4j.services.constants.FeatureConstants.RESOURCE_PROPERTY_STORE
import org.ff4j.services.domain.PropertyApiBean
import org.ff4j.spring.rest.api.utils.FeatureWebUtils
import org.ff4j.web.FF4jWebConstants.OPERATION_UPDATE
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.HttpStatus.ACCEPTED
import org.springframework.http.HttpStatus.NO_CONTENT
import org.springframework.http.MediaType.APPLICATION_JSON_VALUE
Expand All @@ -51,7 +50,7 @@ import reactor.core.publisher.Mono
@Tag(name = "Property", description = "The API for property related operations")
@RestController
@RequestMapping(value = ["\${ff4j.api.context-path:$RESOURCE_FF4J}$RESOURCE_PROPERTY_STORE$RESOURCE_PROPERTIES/$PATH_PARAM_NAME"])
class PropertyResource(@Autowired val propertyServices: PropertyServices) {
class PropertyResource(val propertyServices: PropertyServices) {

@Operation(summary = "Read information about a property", tags = ["Property"])
@ApiResponses(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import org.ff4j.services.domain.PropertyApiBean
import org.ff4j.services.domain.PropertyStoreApiBean
import org.ff4j.web.FF4jWebConstants.RESOURCE_CACHE
import org.ff4j.web.FF4jWebConstants.STORE_CLEAR
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.HttpStatus.NO_CONTENT
import org.springframework.http.MediaType.APPLICATION_JSON_VALUE
import org.springframework.http.ResponseEntity
Expand All @@ -53,7 +52,7 @@ import reactor.core.publisher.Mono
@Tag(name = "PropertyStore", description = "The API for accessing the store for all properties")
@RestController
@RequestMapping(value = ["\${ff4j.api.context-path:$RESOURCE_FF4J}$RESOURCE_PROPERTY_STORE"])
class PropertyStoreResource(@Autowired val propertyStoreServices: PropertyStoreServices) {
class PropertyStoreResource(val propertyStoreServices: PropertyStoreServices) {

@Operation(summary = "Display information regarding Properties Store", tags = ["PropertyStore"])
@ApiResponses(
Expand Down
6 changes: 6 additions & 0 deletions ff4j-spring-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ import org.ff4j.services.domain.AuthorizationsManagerApiBean
import org.ff4j.services.domain.FF4jStatusApiBean
import org.ff4j.services.exceptions.AuthorizationNotExistsException
import org.ff4j.services.validator.FeatureValidator
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
import reactor.core.publisher.Mono

/**
* @author [Paul Williams](mailto:paul58914080@gmail.com)
*/
@Service
class FF4jServices(@Autowired val fF4j: FF4j, @Autowired val ff4jValidator: FeatureValidator) {
class FF4jServices(val fF4j: FF4j, val ff4jValidator: FeatureValidator) {

fun getStatus(): Mono<FF4jStatusApiBean> {
return Mono.just(FF4jStatusApiBean(this.fF4j))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ package org.ff4j.services

import org.ff4j.FF4j
import org.ff4j.services.domain.EventRepositoryApiBean
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
import reactor.core.publisher.Mono

/**
* @author [Paul Williams](mailto:paul58914080@gmail.com)
*/
@Service
class MonitoringServices(@Autowired val fF4j: FF4j) {
class MonitoringServices(val fF4j: FF4j) {

fun getMonitoringStatus(): Mono<EventRepositoryApiBean> {
return Mono.just(EventRepositoryApiBean(fF4j.eventRepository))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.ff4j.services.constants

import org.assertj.core.api.Assertions
import org.junit.Test
import org.junit.jupiter.api.Test

/**
* @author [Paul Williams](mailto:paul58914080@gmail.com)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.ff4j.services.constants

import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.jupiter.api.Test

/**
* @author [Paul Williams](mailto:paul58914080@gmail.com)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package org.ff4j.services.domain

import org.assertj.core.api.Assertions
import org.ff4j.services.constants.CommonConstants
import org.junit.Test
import org.junit.jupiter.api.Test

/**
* @author [Paul Williams](mailto:paul58914080@gmail.com)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
*/
package org.ff4j.services.domain

import org.junit.Assert
import org.junit.Test
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.meanbean.test.BeanTester

/**
Expand All @@ -32,7 +32,7 @@ class DomainTest {

@Test
fun getterAndSetterCorrectness() {
Assert.assertTrue(true)
Assertions.assertTrue(true)
beanTester.testBean(FeatureApiBean::class.java)
beanTester.testBean(FeatureStoreApiBean::class.java)
beanTester.testBean(PropertyStoreApiBean::class.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package org.ff4j.services.domain

import org.assertj.core.api.Assertions
import org.ff4j.services.constants.CommonConstants
import org.junit.Test
import org.junit.jupiter.api.Test

/**
* @author [Paul Williams](mailto:paul58914080@gmail.com)
Expand Down
25 changes: 13 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>21</java.version>
<spring-boot.version>4.0.1</spring-boot.version>
<java.version>25</java.version>
<spring-boot.version>4.1.0</spring-boot.version>
<ff4j.version>2.1</ff4j.version>
<jackson-module-kotlin.version>2.21.0</jackson-module-kotlin.version>
<kotlin.version>2.3.0</kotlin.version>
<cucumber.version>7.33.0</cucumber.version>
<junit-jupiter.version>6.0.2</junit-jupiter.version>
<springdoc-openapi-starter.version>3.0.1</springdoc-openapi-starter.version>
<jackson-module-kotlin.version>3.1.4</jackson-module-kotlin.version>
<kotlin.version>2.4.0</kotlin.version>
<cucumber.version>7.34.4</cucumber.version>
<junit-jupiter.version>6.1.0</junit-jupiter.version>
<springdoc-openapi-starter.version>3.0.3</springdoc-openapi-starter.version>
<meanbean.version>2.0.3</meanbean.version>
<!-- plugin -->
<maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.5.6</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
<license-maven-plugin.version>2.7.1</license-maven-plugin.version>
<maven-resources-plugin.version>3.4.0</maven-resources-plugin.version>
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
Expand All @@ -92,7 +92,7 @@
<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
<aven-source-plugin.version>3.4.0</aven-source-plugin.version>
<dokka-maven-plugin.version>2.1.0</dokka-maven-plugin.version>
<jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
<jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
<maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
<dokka.plugin.version>0.10.0</dokka.plugin.version>
<kotlin.code.style>official</kotlin.code.style>
Expand Down Expand Up @@ -183,7 +183,7 @@
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<groupId>tools.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
<version>${jackson-module-kotlin.version}</version>
</dependency>
Expand Down Expand Up @@ -233,7 +233,7 @@
<artifactId>kotlin-stdlib</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<groupId>tools.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
</dependency>
</dependencies>
Expand Down Expand Up @@ -368,6 +368,7 @@
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.version}</release>
</configuration>
</plugin>
<!-- license -->
Expand Down
Loading