diff --git a/.github/workflows/github-actions-build.yml b/.github/workflows/github-actions-build.yml index 2c93ad6..f33869b 100755 --- a/.github/workflows/github-actions-build.yml +++ b/.github/workflows/github-actions-build.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8', '11', '17' ] + java: [ '17' ] name: Java ${{ matrix.Java }} build with Maven env: @@ -46,7 +46,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: '11' + java-version: '17' - name: Coverage with Jacoco Maven plugin run: mvn verify jacoco:report --quiet --batch-mode -DbuildNumber=${GITHUB_RUN_NUMBER} - uses: codecov/codecov-action@v1 diff --git a/Dockerfile b/Dockerfile index 164c233..9b8556c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ -# java:8 is 600M+, alpine < 200M -# FROM java:8 - -FROM adoptopenjdk/openjdk11:alpine-slim +# java:8 containers are 600M+, alpine < 200M +FROM openjdk/17-jdk-slim EXPOSE 8080 COPY target/spring-boot-example-1.0-SNAPSHOT.jar /app.jar diff --git a/pom.xml b/pom.xml index 96bc55b..8e851c5 100755 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.springframework.boot spring-boot-starter-parent - 2.7.8 + 3.0.5 Simple Spring Boot app to get started. @@ -68,12 +68,12 @@ org.webjars bootstrap - 3.3.7 + 3.4.0 org.webjars jquery - 1.12.4 + 3.6.2 @@ -86,8 +86,8 @@ org.springdoc - springdoc-openapi-ui - 1.7.0 + springdoc-openapi-starter-webmvc-ui + 2.1.0 @@ -238,7 +238,7 @@ org.jacoco jacoco-maven-plugin - 0.8.5 + 0.8.9 diff --git a/src/main/java/example/counter/CounterRequest.java b/src/main/java/example/counter/CounterRequest.java index 59d665c..bd9f6d3 100644 --- a/src/main/java/example/counter/CounterRequest.java +++ b/src/main/java/example/counter/CounterRequest.java @@ -1,6 +1,6 @@ package example.counter; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import lombok.Data; diff --git a/src/main/java/example/counter/CounterRestController.java b/src/main/java/example/counter/CounterRestController.java index b36fec5..b8cded3 100755 --- a/src/main/java/example/counter/CounterRestController.java +++ b/src/main/java/example/counter/CounterRestController.java @@ -1,6 +1,6 @@ package example.counter; -import javax.validation.Valid; +import jakarta.validation.Valid; import io.swagger.v3.oas.annotations.Operation; import org.springframework.http.MediaType; @@ -12,7 +12,7 @@ @RestController @RequestMapping( - produces = MediaType.APPLICATION_JSON_UTF8_VALUE, + produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public class CounterRestController { public static final String ADD_URL = "/counter/add"; diff --git a/src/main/resources/static/css/counter-style.css b/src/main/resources/static/css/counter-style.css index a77e5cb..1ce7266 100755 --- a/src/main/resources/static/css/counter-style.css +++ b/src/main/resources/static/css/counter-style.css @@ -1,17 +1,14 @@ -* { +body { background-color: #eee; } .vertical-center { - min-height: 100%; /* Fallback for browsers do NOT support vh unit */ + min-height: 100%; /* Fallback for browsers who do NOT support vh unit */ min-height: 100vh; /* These two lines are counted as one :-) */ display: flex; flex-direction: column; justify-content: center; } -.container { - width: 100%; -} #result { border: solid #dadada 2px; padding: 2px; diff --git a/src/main/resources/templates/counter.html b/src/main/resources/templates/counter.html index 1a546cf..47bdf16 100755 --- a/src/main/resources/templates/counter.html +++ b/src/main/resources/templates/counter.html @@ -6,14 +6,28 @@ + href="/webjars/bootstrap/3.4.0/css/bootstrap.min.css" /> - - + + - + + + + Spring Boot + + + + Home + Counter + + + + + + First number diff --git a/src/main/resources/templates/greeting.html b/src/main/resources/templates/greeting.html index 7bf71c3..dccb62b 100755 --- a/src/main/resources/templates/greeting.html +++ b/src/main/resources/templates/greeting.html @@ -5,44 +5,40 @@ + href="/webjars/bootstrap/3.4.0/css/bootstrap.min.css" /> + + + + Spring Boot + + + + Home + Counter + + + + - - - Spring Boot - - - - Home - About - + + Spring Boot Web Thymeleaf Example + + + - - - - - - Spring Boot Web Thymeleaf Example - - - - - - - - - + +