I'm using in Eclipse 2025-03:
Springboot 3.4.3 only spring-boot-starter-webflux with Jetty disabling Tomcat not spring-boot-starter-web (we don't use @RestController but only @Service and @Repository because we are using routing function as controller to improve performance webflux in no blocking multi thread)
OpenJDK 21.0.6 LTS
mongoDBReactive and
lombok 1.18.36 (that have a lot of problems with abstract classes and extended classes with @Super that doesn't work in Eclipse 2025-03 on Java 21.0.6)
using router function for more efficently on no blocking Rest API (not @RestController)
Architecture Hexagonal but not reactor multimodule a single module structuring packages and use git branch for different base package of modules (package base as adater port domain service with its subpackages).
With below pom.xml in our project not work:
@Autowire not work (using normal mode but we want to use following best practices. By private attribute and calling constructor passing parameter in autowired),
@Value not work. We must use System.getenv to get values of application.properties
I don't know the reason.
It's very strange thing this.
Thanks a lot for support.
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- Parent project -->
<parent>
<groupId>com.xxx</groupId>
<artifactId>yyyy</artifactId>
<version>0.0.1</version>
</parent>
<!-- Maven project child -->
<groupId>com.aaa</groupId>
<artifactId>bbb</artifactId>
<version>0.0.1</version>
<name>bbb</name>
<description>Carpe diem</description>
<url>/bbb/api/</url>
<properties>
<!-- Java source encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Java for reports encoding -->
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>21</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>
<spring.boot.version>3.4.3</spring.boot.version>
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
<!-- To configure Redis -->
<lettuce-core.version>6.5.4.RELEASE</lettuce-core.version>
<lombok.version>1.18.36</lombok.version>
<guava.version>33.4.0-jre</guava.version>
<de.flapdoodle.embed.mongo.version>4.18.1</de.flapdoodle.embed.mongo.version>
<!-- Swagger -->
<springdoc.version>1.8.0</springdoc.version>
<springdoc.openapi.version>2.8.5</springdoc.openapi.version>
<!-- Main class -->
<main.class>com.aaa.bbb.MyApp</main.class>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId><groupId>com.xxx</groupId></groupId>
<artifactId>ddd</artifactId>
<version>0.0.1</version>
</dependency>
<!-- Webflux -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<exclusions>
<!-- Exclude the Tomcat web server dependency (use jetty for best performance no blocking and multi thread)-->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- Default Jetty page http://localhost:8080/jetty-demo -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<scope>provided</scope>
</dependency>
<!-- MongoDB Reactive -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb-reactive</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<!-- Redis Reactive -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis-reactive</artifactId>
</dependency>
<!-- Libraries for connection and other left jedis and use lettuce -->
<!--
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>5.2.0</version>
</dependency>
-->
<dependency>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webflux-core</artifactId>
<version>${springdoc.version}</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webflux-ui</artifactId>
<version>${springdoc.version}</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webflux-api</artifactId>
<version>${springdoc.openapi.version}</version>
</dependency>
<!-- Add this dependency if in same cases can't use webflux for example get token of APIM, APIGEE
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
### Exclude the Tomcat dependency ###
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Test -->
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<!-- TestContainer allow when application is disconnected from internet
for system integration by test container for example when we will
have sonar to verify inconsistent pattern, password not crypted, ...
-->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mongodb</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<!-- mvn clean package spring-boot:repackage -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>${main.class}</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<!-- maven-dependency-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<!-- Configure the output directory for thedependencies -->
<outputDirectory>${project.build.directory}/libs</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>