Skip to content

Commit

Permalink
fix: update spring-boot 3.2 kotlin 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
osahner committed Nov 25, 2023
1 parent b7d328e commit 08f0ec1
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 12 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=osahner_kotlin-spring-boot-rest-jpa-jwt-starter&metric=coverage)](https://sonarcloud.io/summary/new_code?id=osahner_kotlin-spring-boot-rest-jpa-jwt-starter)

**Features**:
* spring-boot 3.1.x
* kotlin 1.8.x
* spring-boot 3.2.x
* kotlin 1.9.x
* JWT Authentication/Authorization with spring-security [inspired by Auth0](https://auth0.com/blog/implementing-jwt-authentication-on-spring-boot/)
* 2FA with TOTP (Google Authenticator)
* JPA mysql / OpenCVS / POI
Expand All @@ -31,7 +31,7 @@ FLUSH PRIVILEGES;
* **compile & integration tests**
```shell
mvn -Ddockerfile.skip clean compile test
mvn clean compile test
```

* **run app**
Expand All @@ -58,22 +58,25 @@ some more test can be found in [address.http](contributed/requests/address.http)
### Docker

```shell
mvn clean package -Dmaven.test.skip=true
docker run -it -p 8888:8888 --rm osahner/kotlin-spring-boot-rest-jpa-jwt-starter:latest
./contributed/buildDocker.sh (-p) # see below
docker run -it -p 8888:8888 --rm osahner/kotlin-spring-boot-rest-jpa-jwt-starter:0.11.0-SNAPSHOT

curl http://localhost:8888/starter-test/api/v1/test
# result: Pong!%
```

:exclamation: If you develop on Apple Silicon (like me) you can use the simple script `contributed/buildDocker.sh`. Option `-p` is for **production** build (`--platform=linux/amd64` instead of `--platform=linux/arm64/v8` without)

Modify `Dockerfile` to your needs.

### Why

This is my little backend cookbook. I need and use it regularly for various small to medium-sized projects.
* Like it -> use it.
* Found an error -> please [report](https://github.com/osahner/kotlin-spring-boot-rest-jpa-jwt-starter/issues).

### Changelog
* _v0.11.0-SNAPSHOT_: spring-boot 3.2.x, kotlin 1.9.x, java 21
* _v0.10.0-SNAPSHOT_: spring-boot 3.1.x, add 2FA, cleanup
* _v0.9.1-SNAPSHOT_: spring-boot 3.0.x, kotlin 1.8.x, [migrated to SEQ tables](#migrate-to-seq-tables)
* _v0.8.3-SNAPSHOT_: spring-boot 2.7.x, java 17
Expand Down
33 changes: 27 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.4</version>
<version>3.2.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>osahner</groupId>
<artifactId>kotlin-spring-boot-rest-jpa-jwt-starter</artifactId>
<version>0.10.1-SNAPSHOT</version>
<version>0.11.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>kotlin spring-boot 2 rest/jpa/jwt starter</name>
Expand All @@ -21,16 +21,16 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<java.version>17</java.version>
<kotlin.version>1.9.10</kotlin.version>
<java.version>21</java.version>
<kotlin.version>1.9.21</kotlin.version>

<jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>

<jjwt.version>0.12.3</jjwt.version>
<poi.version>5.2.4</poi.version>
<jasypt.version>1.9.3</jasypt.version>
<opencsv.version>5.8</opencsv.version>
<commons-io.version>2.14.0</commons-io.version>
<opencsv.version>5.9</opencsv.version>
<commons-io.version>2.15.0</commons-io.version>
<aerogear-otp-java.version>1.0.0</aerogear-otp-java.version>
</properties>

Expand Down Expand Up @@ -277,4 +277,25 @@
</plugins>
</build>

<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

</project>
1 change: 0 additions & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ spring:
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
implicit-strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
ddl-auto: update
database-platform: org.hibernate.dialect.MySQLDialect
open-in-view: true
properties:
hibernate.show_sql: false
Expand Down

0 comments on commit 08f0ec1

Please sign in to comment.