Skip to content

Commit e823dc2

Browse files
authored
Merge pull request #89 from databucket/feature/Upgrade-libs
Upgrade server to Java17 and upgrade libraries
2 parents ae49eb2 + 8bc138e commit e823dc2

8 files changed

Lines changed: 61 additions & 39 deletions

File tree

.dockerignore

Whitespace-only changes.

Dockerfile

Whitespace-only changes.

build.gradle

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ plugins {
77

88
group = 'pl.databucket'
99
version = '3.4.4'
10-
targetCompatibility = 8
11-
sourceCompatibility = 8
10+
targetCompatibility = 17
11+
sourceCompatibility = 17
12+
13+
ext['log4j2.version'] = '2.20.0'
14+
ext['tomcat.version'] = '9.0.71'
15+
ext['jackson.version'] = '2.14.2'
1216

1317
//compileJava.options.fork = true
1418
//compileJava.options.forkOptions.executable = 'C:\\Program Files\\Java\\jdk1.8.0_191\\bin\\javac'
@@ -17,6 +21,7 @@ configurations {
1721
compileOnly {
1822
extendsFrom annotationProcessor
1923
}
24+
all*.exclude module : 'spring-boot-starter-logging'
2025
}
2126

2227
repositories {
@@ -29,15 +34,16 @@ jar {
2934

3035

3136
dependencies {
32-
implementation 'org.springframework.boot:spring-boot-starter:2.5.7'
33-
implementation 'org.springframework.boot:spring-boot-starter-web:2.5.7'
34-
implementation 'org.springframework.boot:spring-boot-starter-data-jpa:2.5.7'
35-
implementation 'org.springframework.boot:spring-boot-starter-security:2.5.7'
36-
implementation 'org.springframework.boot:spring-boot-starter-actuator:2.5.7'
37-
implementation 'org.springframework.boot:spring-boot-starter-mail:2.5.7'
38-
implementation 'org.springframework:spring-tx:5.3.9'
39-
implementation 'org.postgresql:postgresql:42.2.23.jre7'
40-
implementation 'com.fasterxml.jackson.core:jackson-core:2.13.1'
37+
implementation 'org.springframework.boot:spring-boot-starter:2.7.8'
38+
implementation 'org.springframework.boot:spring-boot-starter-log4j2:2.7.8'
39+
implementation 'org.springframework.boot:spring-boot-starter-web:2.7.8'
40+
implementation 'org.springframework.boot:spring-boot-starter-data-jpa:2.7.8'
41+
implementation 'org.springframework.boot:spring-boot-starter-security:2.7.8'
42+
implementation 'org.springframework.boot:spring-boot-starter-actuator:2.7.8'
43+
implementation 'org.springframework.boot:spring-boot-starter-mail:2.7.8'
44+
implementation 'org.springframework:spring-tx:5.3.25'
45+
implementation 'org.postgresql:postgresql:42.3.8'
46+
implementation 'com.fasterxml.jackson.core:jackson-core:2.14.2'
4147
implementation 'org.projectlombok:lombok:1.18.20'
4248
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
4349
implementation group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0'
@@ -46,7 +52,7 @@ dependencies {
4652
implementation group: 'com.vladmihalcea', name: 'hibernate-types-52', version: '2.12.0'
4753
implementation group: 'io.jsonwebtoken', name: 'jjwt', version: '0.9.1'
4854
implementation group: 'org.modelmapper', name: 'modelmapper', version: '2.4.4'
49-
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.29'
55+
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.33'
5056

5157
compileOnly 'org.projectlombok:lombok:1.18.20'
5258
annotationProcessor 'org.projectlombok:lombok'
@@ -66,7 +72,7 @@ dependencies {
6672

6773
test {
6874
// useJUnitPlatform()
69-
afterSuite {desc, result ->
75+
afterSuite { desc, result ->
7076
if (!desc.parent) {
7177
println("${result.resultType} " +
7278
"(${result.testCount} tests, " +
@@ -79,11 +85,11 @@ test {
7985

8086
import org.apache.tools.ant.taskdefs.condition.Os
8187

82-
task deleteStatic(type: Delete) {
88+
tasks.register('deleteStatic', Delete) {
8389
delete "src/main/resources/static"
8490
}
8591

86-
task buildFrontend() {
92+
tasks.register('buildFrontend') {
8793
String npm = 'npm'
8894
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
8995
npm = 'npm.cmd'
@@ -100,7 +106,7 @@ task buildFrontend() {
100106
}
101107
}
102108

103-
task copyFrontend() {
109+
tasks.register('copyFrontend') {
104110
copy {
105111
from "frontend/build"
106112
into "src/main/resources/static"
@@ -109,4 +115,4 @@ task copyFrontend() {
109115

110116
copyFrontend.dependsOn buildFrontend
111117

112-
bootJar.dependsOn copyFrontend
118+
bootJar.dependsOn copyFrontend

docker-compose.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '3.3'
2+
services:
3+
postgres:
4+
image: postgres:12.2-alpine
5+
ports:
6+
- "5432:5432"
7+
environment:
8+
POSTGRES_USER: databucket_user
9+
POSTGRES_PASSWORD: databucket_user
10+
POSTGRES_DB: databucket
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/resources/application-dev.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ spring:
1111
url: jdbc:postgresql://localhost:5432/databucket
1212
username: databucket_user
1313
password: databucket_user
14-
14+
mail:
15+
host: smtp.gmail.com
16+
port: 587
17+
username: username
18+
password: password
19+
from: admin@email.io
1520
logging:
1621
level:
1722
pl.databucket.service.data.DataService: debug

src/main/resources/log4j2.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Configuration status="WARN" monitorInterval="30">
3+
<Properties>
4+
<Property name="LOG_PATTERN">
5+
<!-- %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(:){faint} %m%n%wEx-->
6+
%style{%d{ISO8601}}{bright,black} %highlight{%-5level }[%style{%t}{bright,blue}] %style{%c{1.}}{bright,yellow}: %msg%n%throwable
7+
</Property>
8+
</Properties>
9+
<Appenders>
10+
<Console name="ConsoleLog" target="SYSTEM_OUT" follow="true">
11+
<PatternLayout pattern="${LOG_PATTERN}"/>
12+
</Console>
13+
</Appenders>
14+
<Loggers>
15+
<Root level="info">
16+
<AppenderRef ref="ConsoleLog"/>
17+
</Root>
18+
<Logger name="pl.databucket.server.service" level="debug"/>
19+
<Logger name="pl.databucket.server.controller" level="debug"/>
20+
</Loggers>
21+
</Configuration>

src/main/resources/logback-spring.xml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)