Skip to content

Commit d46e4c4

Browse files
committed
update deps
Signed-off-by: Kirill Mokevnin <[email protected]>
1 parent f5596e1 commit d46e4c4

File tree

11 files changed

+93
-96
lines changed

11 files changed

+93
-96
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# COPY frontend /frontend
77
# RUN npm run build
88

9-
FROM eclipse-temurin:20-jdk
9+
FROM eclipse-temurin:24-jdk
1010

11-
ARG GRADLE_VERSION=8.3
11+
ARG GRADLE_VERSION=9.0.0
1212

1313
RUN apt-get update && apt-get install -yq make unzip
1414

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
setup:
2-
./gradlew wrapper --gradle-version 8.14.1
2+
./gradlew wrapper --gradle-version 9.0.0
33
./gradlew build
44

55
app:
@@ -22,6 +22,9 @@ install:
2222
test:
2323
./gradlew test
2424

25+
lint:
26+
./gradlew spotlessApply
27+
2528
update-deps:
2629
./gradlew refreshVersions
2730

build.gradle.kts

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
2-
import org.gradle.api.tasks.testing.logging.TestLogEvent
1+
// import org.gradle.api.tasks.testing.logging.TestExceptionFormat
2+
// import org.gradle.api.tasks.testing.logging.TestLogEvent
33

44
plugins {
5+
alias(libs.plugins.spotless)
6+
57
application
6-
jacoco
7-
checkstyle
8+
// jacoco
89
alias(libs.plugins.lombok)
9-
alias(libs.plugins.versions)
10-
alias(libs.plugins.spotless)
10+
// alias(libs.plugins.versions)
11+
// alias(libs.plugins.spotless)
1112
alias(libs.plugins.spring.boot)
1213
alias(libs.plugins.spring.dependency.management)
1314
alias(libs.plugins.shadow)
14-
alias(libs.plugins.sonarqube)
15+
// alias(libs.plugins.sonarqube)
1516
}
1617

1718
group = "io.hexlet.blog"
@@ -21,6 +22,12 @@ application {
2122
mainClass.set("io.hexlet.blog.Application")
2223
}
2324

25+
// java {
26+
// toolchain {
27+
// languageVersion.set(JavaLanguageVersion.of(21))
28+
// }
29+
// }
30+
2431
repositories {
2532
mavenCentral()
2633
}
@@ -59,40 +66,47 @@ dependencies {
5966
testRuntimeOnly(libs.junitPlatformLauncher)
6067
}
6168

69+
// Show deprecation warnings to pinpoint source
70+
tasks.withType<JavaCompile>().configureEach {
71+
options.compilerArgs.add("-Xlint:deprecation")
72+
}
73+
6274
tasks.test {
6375
useJUnitPlatform()
64-
testLogging {
65-
exceptionFormat = TestExceptionFormat.FULL
66-
events =
67-
setOf(
68-
TestLogEvent.FAILED,
69-
TestLogEvent.PASSED,
70-
TestLogEvent.SKIPPED,
71-
)
72-
showStandardStreams = true
73-
}
76+
// Silence CDS warning emitted by the JVM during tests
77+
jvmArgs("-Xshare:off")
78+
// Uncomment to enable detailed logging
79+
// testLogging {
80+
// exceptionFormat = TestExceptionFormat.FULL
81+
// events = setOf(
82+
// TestLogEvent.FAILED,
83+
// TestLogEvent.PASSED,
84+
// TestLogEvent.SKIPPED,
85+
// )
86+
// showStandardStreams = true
87+
// }
7488
}
7589

76-
tasks.jacocoTestReport {
77-
reports {
78-
xml.required.set(true)
79-
}
80-
}
90+
// tasks.jacocoTestReport {
91+
// reports {
92+
// xml.required.set(true)
93+
// }
94+
// }
8195

8296
spotless {
8397
java {
8498
importOrder()
8599
removeUnusedImports()
86100
eclipse().sortMembersEnabled(true)
87101
formatAnnotations()
88-
indentWithSpaces(4)
102+
leadingTabsToSpaces(4)
89103
}
90104
}
91105

92-
sonar {
93-
properties {
94-
property("sonar.projectKey", "hexlet-boilerplates_java-package")
95-
property("sonar.organization", "hexlet-boilerplates")
96-
property("sonar.host.url", "https://sonarcloud.io")
97-
}
98-
}
106+
// sonar {
107+
// properties {
108+
// property("sonar.projectKey", "hexlet-boilerplates_java-package")
109+
// property("sonar.organization", "hexlet-boilerplates")
110+
// property("sonar.host.url", "https://sonarcloud.io")
111+
// }
112+
// }

gradle/libs.versions.toml

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,52 @@ spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot-vers
66
spring-dependency-management = { id = "io.spring.dependency-management", version.ref = "spring-dependency-version" }
77
lombok = { id = "io.freefair.lombok", version.ref = "lombok-plugin" }
88
versions = { id = "com.github.ben-manes.versions", version.ref = "versions-plugin" }
9-
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow-plugin" }
9+
shadow = { id = "com.gradleup.shadow", version.ref = "shadow-plugin" }
1010
sonarqube = { id = "org.sonarqube", version.ref = "sonarqube-plugin" }
1111
spotless = { id = "com.diffplug.spotless", version.ref = "spotless-plugin" }
1212

13+
# com-diffplug-spotless = { id = "com.diffplug.spotless", version = "7.2.1" }
14+
#
15+
# io-freefair-lombok = { id = "io.freefair.lombok", version = "9.0.0-rc2" }
16+
#
17+
# com-github-ben-manes-versions = { id = "com.github.ben-manes.versions", version = "0.52.0" }
18+
#
19+
# org-springframework-boot = { id = "org.springframework.boot", version = "3.5.5" }
20+
#
21+
# io-spring-dependency-management = { id = "io.spring.dependency-management", version = "1.1.7" }
22+
#
23+
# com-gradleup-shadow = { id = "com.gradleup.shadow", version = "9.1.0" }
24+
#
25+
# org-sonarqube = { id = "org.sonarqube", version = "6.2.0.5505" }
26+
1327
[versions]
1428

15-
spring-boot-version = "3.5.0"
29+
spring-boot-version = "3.5.5"
30+
1631
spring-dependency-version = "1.1.7"
17-
lombok-plugin = "8.13.1"
32+
lombok-plugin = "9.0.0-rc2"
1833
versions-plugin = "0.52.0"
19-
shadow-plugin = "8.1.1"
34+
shadow-plugin = "9.1.0"
2035
sonarqube-plugin = "6.2.0.5505"
21-
spotless-plugin = "7.0.3"
36+
spotless-plugin = "7.2.1"
2237

23-
commons-lang3 = "3.17.0"
38+
commons-lang3 = "3.18.0"
2439
commons-collections4 = "4.5.0"
25-
junit-bom = "5.12.2"
26-
## ⬆ = "5.13.0-M1"
27-
## ⬆ = "5.13.0-M2"
28-
## ⬆ = "5.13.0-M3"
29-
## ⬆ = "5.13.0-RC1"
30-
jackson-databind-nullable = "0.2.6"
31-
springdoc-openapi-ui = "2.8.8"
40+
junit-bom = "5.13.4"
41+
42+
jackson-databind-nullable = "0.2.7"
43+
springdoc-openapi-ui = "2.8.13"
44+
3245
datafaker = "2.4.3"
33-
instancio-junit = "5.4.1"
46+
instancio-junit = "5.5.1"
3447
jsonunit-assertj = "4.1.1"
3548
mapstruct = "1.6.3"
3649
h2 = "2.3.232"
3750

51+
junit = "5.13.4"
52+
3853
[libraries]
3954

40-
# Spring Boot
4155
springBootStarterWeb = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "spring-boot-version" }
4256
springBootStarterDataJpa = { module = "org.springframework.boot:spring-boot-starter-data-jpa", version.ref = "spring-boot-version" }
4357
springBootStarterValidation = { module = "org.springframework.boot:spring-boot-starter-validation", version.ref = "spring-boot-version" }
@@ -47,27 +61,21 @@ springBootStarterTest = { module = "org.springframework.boot:spring-boot-starter
4761
springBootDevtools = { module = "org.springframework.boot:spring-boot-devtools", version.ref = "spring-boot-version" }
4862
springBootConfigProcessor = { module = "org.springframework.boot:spring-boot-configuration-processor", version.ref = "spring-boot-version" }
4963

50-
# OpenAPI
5164
springdocOpenapiUi = { module = "org.springdoc:springdoc-openapi-starter-webmvc-ui", version.ref = "springdoc-openapi-ui" }
5265

53-
# Jackson
5466
jacksonDatabindNullable = { module = "org.openapitools:jackson-databind-nullable", version.ref = "jackson-databind-nullable" }
5567

56-
# Utility libraries
5768
commonsLang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commons-lang3" }
5869
commonsCollections4 = { module = "org.apache.commons:commons-collections4", version.ref = "commons-collections4" }
59-
datafaker = { module = "net.datafaker:datafaker", version.ref = "datafaker" }
70+
datafaker = "net.datafaker:datafaker:2.4.4"
6071
instancioJunit = { module = "org.instancio:instancio-junit", version.ref = "instancio-junit" }
6172
jsonunitAssertj = { module = "net.javacrumbs.json-unit:json-unit-assertj", version.ref = "jsonunit-assertj" }
6273

63-
# MapStruct
64-
mapstruct = { module = "org.mapstruct:mapstruct", version.ref = "mapstruct" }
74+
mapstruct = "org.mapstruct:mapstruct:1.6.3"
6575
mapstructProcessor = { module = "org.mapstruct:mapstruct-processor", version.ref = "mapstruct" }
6676

67-
# DB
68-
h2 = { module = "com.h2database:h2", version.ref = "h2" }
77+
h2 = "com.h2database:h2:2.3.232"
6978

70-
# JUnit
7179
junitBom = { module = "org.junit:junit-bom", version.ref = "junit-bom" }
7280
junitJupiter = { module = "org.junit.jupiter:junit-jupiter" }
7381
junitPlatformLauncher = { module = "org.junit.platform:junit-platform-launcher" }

gradle/wrapper/gradle-wrapper.jar

1.83 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright © 2015 the original authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -205,15 +205,15 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.
212212

213213
set -- \
214214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215215
-classpath "$CLASSPATH" \
216-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217217
"$@"
218218

219219
# Stop when "xargs" is not available.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
set CLASSPATH=
7474

7575

7676
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7878

7979
:end
8080
@rem End local scope for the variables with windows NT shell

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ rootProject.name = "SpringBootApplication"
44

55
plugins {
66
// See https://jmfayard.github.io/refreshVersions
7-
id("de.fayard.refreshVersions") version "0.60.5"
7+
id("de.fayard.refreshVersions") version "0.60.6"
88
}
Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,18 @@
11
package io.hexlet.blog.config;
22

3-
import io.hexlet.blog.service.CustomUserDetailsService;
4-
import lombok.AllArgsConstructor;
5-
import org.springframework.beans.factory.annotation.Autowired;
63
import org.springframework.context.annotation.Bean;
74
import org.springframework.context.annotation.Configuration;
8-
import org.springframework.security.authentication.AuthenticationManager;
9-
import org.springframework.security.authentication.AuthenticationProvider;
10-
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
11-
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
125
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
136
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
14-
import org.springframework.security.crypto.password.PasswordEncoder;
157
import org.springframework.security.web.SecurityFilterChain;
16-
import org.springframework.web.servlet.handler.HandlerMappingIntrospector;
178

189
@Configuration
1910
@EnableWebSecurity
20-
@AllArgsConstructor
2111
public class SecurityConfig {
22-
@Autowired
23-
private final PasswordEncoder passwordEncoder;
24-
25-
@Autowired
26-
private CustomUserDetailsService userService;
27-
28-
@Bean
29-
public AuthenticationManager authenticationManager(HttpSecurity http) throws Exception {
30-
return http.getSharedObject(AuthenticationManagerBuilder.class).build();
31-
}
32-
33-
@Bean
34-
public AuthenticationProvider daoAuthProvider(AuthenticationManagerBuilder auth) {
35-
DaoAuthenticationProvider provider = new DaoAuthenticationProvider();
36-
provider.setUserDetailsService(userService);
37-
provider.setPasswordEncoder(passwordEncoder);
38-
return provider;
39-
}
4012

4113
@Bean
42-
public SecurityFilterChain securityFilterChain(HttpSecurity http, HandlerMappingIntrospector introspector)
43-
throws Exception {
14+
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
15+
// Customize as needed; minimal chain without deprecated APIs
4416
return http.build();
4517
}
4618
}

0 commit comments

Comments
 (0)