Skip to content

Commit 8bc138e

Browse files
committed
Upgrade libs and force versions on necessary dependencies; Switch logging to Logback2
1 parent 21008f7 commit 8bc138e

4 files changed

Lines changed: 43 additions & 31 deletions

File tree

build.gradle

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@ version = '3.4.4'
1010
targetCompatibility = 17
1111
sourceCompatibility = 17
1212

13+
ext['log4j2.version'] = '2.20.0'
14+
ext['tomcat.version'] = '9.0.71'
15+
ext['jackson.version'] = '2.14.2'
16+
1317
//compileJava.options.fork = true
1418
//compileJava.options.forkOptions.executable = 'C:\\Program Files\\Java\\jdk1.8.0_191\\bin\\javac'
1519

1620
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.6.8'
33-
implementation 'org.springframework.boot:spring-boot-starter-web:2.6.8'
34-
implementation 'org.springframework.boot:spring-boot-starter-data-jpa:2.6.9'
35-
implementation 'org.springframework.boot:spring-boot-starter-security:2.6.8'
36-
implementation 'org.springframework.boot:spring-boot-starter-actuator:2.6.8'
37-
implementation 'org.springframework.boot:spring-boot-starter-mail:2.6.8'
38-
implementation 'org.springframework:spring-tx:5.3.9'
39-
implementation 'org.postgresql:postgresql:42.2.27'
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'
@@ -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, " +

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)