Example: Create project in the IaC-ECS-CDK directory.
fcaj-spring folder)Open VS Code, select the IaC-ECS-CDK directory, and click Select folder.


Press Ctrl + Shift + P (or Cmd + Shift + P on macOS) to open the Command Palette -> type java in the search box -> select Java: Create Java Project

Select the following configurations in order:
com.examplefcaj-springcom.example.fcaj_springJar25 (Corresponding to JDK 25)Spring Boot Devtools, Thymeleaf, Spring Web, Spring Boot Actuator









After completing the steps in creating the Spring Boot project, a window will appear to select the directory to save the Spring Boot project. Select the IaC-ECS-CDK directory and click Generate into folder.

After successful creation, we will have the fcaj-spring folder inside the IaC-ECS-CDK directory.
Next, click Run java to check that the Spring Boot project has downloaded all dependencies and works normally.
.\mvnw spring-boot:run
As you can see in the image, the project is running on port 8080.

pom.xmlThe Log4j2 library supports Asynchronous Loggers based on the LMAX Disruptor library, minimizing latency for the main application thread when writing high volumes of logs, outperforming traditional logging libraries.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.25.16</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb-enhanced</artifactId>
</dependency>

<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-xray-recorder-sdk-core</artifactId>
<version>2.15.3</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-xray-recorder-sdk-aws-sdk-v2</artifactId>
<version>2.15.3</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-xray-recorder-sdk-spring</artifactId>
<version>2.15.3</version>
</dependency>

Create an HTTP GET request to http://localhost:8080/actuator/health to test.
The response returns "status": "UP", indicating that the project is operating normally.

If you encounter an issue where you cannot test HTTP GET with http://localhost:8080/actuator/health, please check the configuration in pom.xml to ensure the spring-boot-starter-actuator dependency has been added. If not, add the library:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>