Skip to content

Commit 358ffc6

Browse files
committed
springboot3 template import
1 parent a5ff055 commit 358ffc6

File tree

6 files changed

+233
-0
lines changed

6 files changed

+233
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#Maven
2+
target/
3+
pom.xml.tag
4+
pom.xml.releaseBackup
5+
pom.xml.versionsBackup
6+
release.properties
7+
.flattened-pom.xml
8+
9+
# Eclipse
10+
.project
11+
.classpath
12+
.settings/
13+
bin/
14+
15+
# IntelliJ
16+
.idea
17+
*.ipr
18+
*.iml
19+
*.iws
20+
21+
# NetBeans
22+
nb-configuration.xml
23+
24+
# Visual Studio Code
25+
.vscode
26+
.factorypath
27+
28+
# OSX
29+
.DS_Store
30+
31+
# Vim
32+
*.swp
33+
*.swo
34+
35+
# patch
36+
*.orig
37+
*.rej
38+
39+
# Local environment
40+
.env
41+
42+
# Plugin directory
43+
/.quarkus/cli/plugins/
44+
# TLS Certificates
45+
.certs/
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Read Me First
2+
The following was discovered as part of building this project:
3+
4+
* The original package name 'org.fugerit.java.template.fugerit-springboot3-template' is invalid and this project uses 'org.fugerit.java.template.fugerit_springboot3_template' instead.
5+
6+
# Getting Started
7+
8+
### Reference Documentation
9+
For further reference, please consider the following sections:
10+
11+
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
12+
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/3.3.3/maven-plugin)
13+
* [Create an OCI image](https://docs.spring.io/spring-boot/3.3.3/maven-plugin/build-image.html)
14+
* [GraalVM Native Image Support](https://docs.spring.io/spring-boot/3.3.3/reference/packaging/native-image/introducing-graalvm-native-images.html)
15+
* [Spring Web](https://docs.spring.io/spring-boot/docs/3.3.3/reference/htmlsingle/index.html#web)
16+
* [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/3.3.3/reference/htmlsingle/index.html#using.devtools)
17+
18+
### Guides
19+
The following guides illustrate how to use some features concretely:
20+
21+
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
22+
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
23+
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
24+
25+
### Additional Links
26+
These additional references should also help you:
27+
28+
* [Configure AOT settings in Build Plugin](https://docs.spring.io/spring-boot/3.3.3/how-to/aot.html)
29+
30+
## GraalVM Native Support
31+
32+
This project has been configured to let you generate either a lightweight container or a native executable.
33+
It is also possible to run your tests in a native image.
34+
35+
### Lightweight Container with Cloud Native Buildpacks
36+
If you're already familiar with Spring Boot container images support, this is the easiest way to get started.
37+
Docker should be installed and configured on your machine prior to creating the image.
38+
39+
To create the image, run the following goal:
40+
41+
```
42+
$ ./mvnw spring-boot:build-image -Pnative
43+
```
44+
45+
Then, you can run the app like any other container:
46+
47+
```
48+
$ docker run --rm -p 8080:8080 fugerit-springboot3-template:0.0.1-SNAPSHOT
49+
```
50+
51+
### Executable with Native Build Tools
52+
Use this option if you want to explore more options such as running your tests in a native image.
53+
The GraalVM `native-image` compiler should be installed and configured on your machine.
54+
55+
NOTE: GraalVM 22.3+ is required.
56+
57+
To create the executable, run the following goal:
58+
59+
```
60+
$ ./mvnw native:compile -Pnative
61+
```
62+
63+
Then, you can run the app as follows:
64+
```
65+
$ target/fugerit-springboot3-template
66+
```
67+
68+
You can also run your existing tests suite in a native image.
69+
This is an efficient way to validate the compatibility of your application.
70+
71+
To run your existing tests in a native image, run the following goal:
72+
73+
```
74+
$ ./mvnw test -PnativeTest
75+
```
76+
77+
78+
### Maven Parent overrides
79+
80+
Due to Maven's design, elements are inherited from the parent POM to the project POM.
81+
While most of the inheritance is fine, it also inherits unwanted elements like `<license>` and `<developers>` from the parent.
82+
To prevent this, the project POM contains empty overrides for these elements.
83+
If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.
84+
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>3.3.3</version>
9+
<relativePath/> <!-- lookup parent from repository -->
10+
</parent>
11+
<groupId>org.fugerit.java.template</groupId>
12+
<artifactId>fugerit-springboot3-template</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
<name>fugerit-springboot3-template</name>
15+
<description>Fugerit SpringBoot Template</description>
16+
<url/>
17+
<licenses>
18+
<license/>
19+
</licenses>
20+
<developers>
21+
<developer/>
22+
</developers>
23+
<scm>
24+
<connection/>
25+
<developerConnection/>
26+
<tag/>
27+
<url/>
28+
</scm>
29+
<properties>
30+
<java.version>21</java.version>
31+
</properties>
32+
<dependencies>
33+
<dependency>
34+
<groupId>org.springframework.boot</groupId>
35+
<artifactId>spring-boot-starter-web</artifactId>
36+
</dependency>
37+
38+
<dependency>
39+
<groupId>org.springframework.boot</groupId>
40+
<artifactId>spring-boot-devtools</artifactId>
41+
<scope>runtime</scope>
42+
<optional>true</optional>
43+
</dependency>
44+
<dependency>
45+
<groupId>org.projectlombok</groupId>
46+
<artifactId>lombok</artifactId>
47+
<optional>true</optional>
48+
</dependency>
49+
<dependency>
50+
<groupId>org.springframework.boot</groupId>
51+
<artifactId>spring-boot-starter-test</artifactId>
52+
<scope>test</scope>
53+
</dependency>
54+
</dependencies>
55+
56+
<build>
57+
<plugins>
58+
<plugin>
59+
<groupId>org.graalvm.buildtools</groupId>
60+
<artifactId>native-maven-plugin</artifactId>
61+
</plugin>
62+
<plugin>
63+
<groupId>org.springframework.boot</groupId>
64+
<artifactId>spring-boot-maven-plugin</artifactId>
65+
<configuration>
66+
<excludes>
67+
<exclude>
68+
<groupId>org.projectlombok</groupId>
69+
<artifactId>lombok</artifactId>
70+
</exclude>
71+
</excludes>
72+
</configuration>
73+
</plugin>
74+
</plugins>
75+
</build>
76+
77+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.fugerit.java.template.fugerit_springboot3_template;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class FugeritSpringboot3TemplateApplication {
8+
9+
public static void main(String[] args) {
10+
SpringApplication.run(FugeritSpringboot3TemplateApplication.class, args);
11+
}
12+
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
spring.application.name=fugerit-springboot3-template
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.fugerit.java.template.fugerit_springboot3_template;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.springframework.boot.test.context.SpringBootTest;
5+
6+
@SpringBootTest
7+
class FugeritSpringboot3TemplateApplicationTests {
8+
9+
@Test
10+
void contextLoads() {
11+
}
12+
13+
}

0 commit comments

Comments
 (0)