Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8ad1147
merge NoResourceFoundExceptionHandler into RoutingExceptionsHandler
pvdbosch Feb 23, 2026
8ba5f31
don't use Spring Boot's @ConfigurationProperties
pvdbosch Feb 23, 2026
663387b
[spring] specific java packages for server and client
pvdbosch Feb 23, 2026
ca4cd23
[spring] merge all spring common-* and *-core modules (WIP)
pvdbosch Feb 23, 2026
b69e65f
spring refactoring WIP:
pvdbosch Feb 23, 2026
ed3f0f0
spring refactoring WIP:
pvdbosch Feb 24, 2026
c654849
rename spring modules
pvdbosch Feb 24, 2026
bbba49f
minor cleanup
pvdbosch Feb 24, 2026
1e4f78f
fix module names in jacoco module
pvdbosch Feb 24, 2026
4881cc1
avoid exposing abstract classes to Spring users:
pvdbosch Feb 24, 2026
9e46f35
add EnableProblemModule for use in non-Spring-Boot
pvdbosch Feb 24, 2026
aee5235
- javadoc fixes
pvdbosch Feb 24, 2026
2080a17
instantiate beans within @Configuration classes instead of @Import of…
pvdbosch Feb 24, 2026
693e8fd
remove abstract classes for customizers in spring module, bc they're …
pvdbosch Feb 26, 2026
005f51c
change the way it-common-jakarta is generated, to improve integration…
pvdbosch Mar 3, 2026
6039da7
[spring-only] add missing parameterNameProvider config for bean valid…
pvdbosch Mar 3, 2026
b18fa5e
add integration test for spring-without-boot
pvdbosch Mar 3, 2026
a277652
EnableProblemModule: use enum to configure Jackson version
pvdbosch Mar 3, 2026
04b6033
update doc
pvdbosch Mar 3, 2026
a38c4f5
it-jakarta: transform beans.xml
pvdbosch Mar 3, 2026
1b0622f
Merge branch 'main' into feature/spring-without-boot
pvdbosch Mar 3, 2026
e5a8e3a
Merge branch 'main' into feature/spring-without-boot
jpraet Mar 3, 2026
570fc7c
Align minimal jackson3 version with the one in spring boot 4.0
pvdbosch Mar 3, 2026
a7f7e98
Cleanup referenced modules in bom and jacoco-aggregator
jpraet Mar 12, 2026
9c34d86
Merge branch 'main' into feature/spring-without-boot
jpraet Mar 12, 2026
9d5016f
Cleanup referenced modules in bom and jacoco-aggregator
jpraet Mar 12, 2026
2949573
Merge branch 'main' into feature/spring-without-boot
jpraet Mar 16, 2026
0c5115e
Merge branch 'main' into feature/spring-without-boot
jpraet Mar 16, 2026
6c8fc7f
Merge branch 'main' into feature/spring-without-boot
jpraet Mar 17, 2026
71faaca
handle PR feedback
pvdbosch Mar 18, 2026
6b7dcae
Update documentation
jpraet Mar 18, 2026
3e505ae
add "-starter" to spring-boot-3 module name
pvdbosch Mar 18, 2026
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
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ updates:
- dependency-name: "org.jboss.weld:weld-junit5"
- dependency-name: "org.hibernate.validator:hibernate-validator"
- dependency-name: "com.fasterxml.jackson.core:jackson-databind"
- dependency-name: "tools.jackson.core:jackson-databind"
groups:
maven:
patterns:
Expand Down
29 changes: 7 additions & 22 deletions belgif-rest-problem-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,7 @@
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-common-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-common-server</artifactId>
<artifactId>belgif-rest-problem-spring</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand All @@ -83,37 +73,32 @@
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-3-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-3-client</artifactId>
<artifactId>belgif-rest-problem-spring-boot-3-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-3-server</artifactId>
<artifactId>belgif-rest-problem-spring-boot-3-client-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-4</artifactId>
<artifactId>belgif-rest-problem-spring-boot-3-server-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-4-core</artifactId>
<artifactId>belgif-rest-problem-spring-boot-4-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-4-client</artifactId>
<artifactId>belgif-rest-problem-spring-boot-4-client-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-4-server</artifactId>
<artifactId>belgif-rest-problem-spring-boot-4-server-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<dependencies>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-3</artifactId>
<artifactId>belgif-rest-problem-spring-boot-3-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<dependencies>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring-boot-4</artifactId>
<artifactId>belgif-rest-problem-spring-boot-4-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -109,7 +109,8 @@
<openapiNormalizer>REF_AS_PARENT_IN_ALLOF=true</openapiNormalizer>
<generateSupportingFiles>false</generateSupportingFiles>
<configOptions>
<useSpringBoot3>true</useSpringBoot3>
<useSpringBoot4>true</useSpringBoot4>
<useJackson3>true</useJackson3>
<interfaceOnly>true</interfaceOnly>
<skipDefaultInterface>true</skipDefaultInterface>
<openApiNullable>false</openApiNullable>
Expand Down
146 changes: 146 additions & 0 deletions belgif-rest-problem-it/belgif-rest-problem-spring-it/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-it</artifactId>
<version>${revision}</version>
</parent>

<artifactId>belgif-rest-problem-spring-it</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
<packaging>jar</packaging>

<properties>
<maven.compiler.release>17</maven.compiler.release>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${version.spring.boot.4}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-spring</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-validator</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>io.github.belgif.rest.problem</groupId>
<artifactId>belgif-rest-problem-it-common-jakarta</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>com.atlassian.oai</groupId>
<artifactId>swagger-request-validator-spring-webmvc</artifactId>
<version>2.46.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webmvc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>6.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/../belgif-rest-problem-it-common/src/main/resources/openapi.yaml</inputSpec>
<generatorName>spring</generatorName>
<apiPackage>io.github.belgif.rest.problem.it.openapi.validation.sb4.api</apiPackage>
<modelPackage>io.github.belgif.rest.problem.it.openapi.validation.sb4.model</modelPackage>
<openapiNormalizer>REF_AS_PARENT_IN_ALLOF=true</openapiNormalizer>
<generateSupportingFiles>false</generateSupportingFiles>
<configOptions>
<useSpringBoot3>true</useSpringBoot3>
<interfaceOnly>true</interfaceOnly>
<skipDefaultInterface>true</skipDefaultInterface>
<openApiNullable>false</openApiNullable>
<annotationLibrary>none</annotationLibrary>
<documentationProvider>none</documentationProvider>
<useBeanValidation>false</useBeanValidation>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package io.github.belgif.rest.problem.it;

import java.net.URI;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.acme.custom.CustomProblem;

import io.github.belgif.rest.problem.BadRequestProblem;
import io.github.belgif.rest.problem.api.Problem;
import io.github.belgif.rest.problem.it.model.JacksonModel;

@RestController
@RequestMapping("/backend")
public class BackendController {

@GetMapping("/ok")
public ResponseEntity<String> ok() {
return ResponseEntity.ok("OK");
}

@GetMapping("/badRequest")
public void badRequest() {
BadRequestProblem problem = new BadRequestProblem();
problem.setDetail("Bad Request from backend");
throw problem;
}

@GetMapping("/custom")
public void custom() {
throw new CustomProblem("value from backend");
}

@GetMapping("/unmapped")
public void unmapped() {
Problem unmapped = new Problem(URI.create("urn:problem-type:belgif:test:unmapped"), "Unmapped problem", 400) {
};
unmapped.setDetail("Unmapped problem from backend");
throw unmapped;
}

@GetMapping("/applicationJsonProblem")
public ResponseEntity<BadRequestProblem> applicationJsonProblem() {
BadRequestProblem problem = new BadRequestProblem();
problem.setDetail("Bad Request with application/json media type from backend");
return ResponseEntity.badRequest().body(problem);
}

@GetMapping("/jacksonMismatchedInput")
public ResponseEntity<JacksonModel> mismatchedInput() {
JacksonModel model = new JacksonModel(null);
model.setDescription("description");
return ResponseEntity.ok(model);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.github.belgif.rest.problem.it;

public enum Client {

REST_TEMPLATE, WEB_CLIENT, REST_CLIENT

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package io.github.belgif.rest.problem.it;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Validated
@Controller
public interface ControllerInterface {

@GetMapping("/beanValidation/pathParameter/inherited/{param}")
ResponseEntity<String> beanValidationPathParameterInherited(
@PathVariable("param") @Positive @NotNull Integer p);

@GetMapping("/beanValidation/pathParameter/overridden/{param}")
ResponseEntity<String> beanValidationPathParameterOverridden(
@PathVariable("param") @Positive @NotNull Integer p);

}
Loading