Skip to content

Commit 6a1793b

Browse files
authored
Update backend dependencies (#904)
1 parent da3a817 commit 6a1793b

File tree

9 files changed

+64
-67
lines changed

9 files changed

+64
-67
lines changed

backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eclipse-temurin:21-jre-alpine
1+
FROM eclipse-temurin:23-jre-alpine
22
33
COPY build/libs/cmsch.jar /opt/cmsch/
44
WORKDIR /opt/cmsch

backend/build.gradle.kts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
22
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33

44
plugins {
5-
id("org.springframework.boot") version "3.4.5"
5+
id("org.springframework.boot") version "3.5.0"
66
id("io.spring.dependency-management") version "1.1.7"
77
id("org.owasp.dependencycheck") version "12.1.1"
8-
kotlin("jvm") version "2.1.20"
9-
kotlin("plugin.spring") version "2.1.20"
10-
id("org.sonarqube") version "4.4.1.3373"
8+
kotlin("jvm") version "2.1.21"
9+
kotlin("plugin.spring") version "2.1.21"
10+
id("org.sonarqube") version "6.2.0.5505"
1111
}
1212

1313
group = "hu.bme.sch"
@@ -42,8 +42,8 @@ repositories {
4242
}
4343

4444
dependencies {
45-
implementation("com.google.firebase:firebase-admin:9.4.3")
46-
implementation("software.amazon.awssdk:s3:2.31.32")
45+
implementation("com.google.firebase:firebase-admin:9.5.0")
46+
implementation("software.amazon.awssdk:s3:2.31.57")
4747
implementation("jakarta.xml.bind:jakarta.xml.bind-api:4.0.2")
4848
implementation("org.springframework.boot:spring-boot-configuration-processor")
4949
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
@@ -59,11 +59,11 @@ dependencies {
5959
implementation("org.springframework.boot:spring-boot-starter-aop")
6060
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
6161
implementation("com.squareup.okhttp3:okhttp:4.12.0")
62-
implementation("com.itextpdf:itext-core:9.1.0")
62+
implementation("com.itextpdf:itext-core:9.2.0")
6363
implementation("com.github.spullara.mustache.java:compiler:0.9.14")
6464
implementation("org.jetbrains.kotlin:kotlin-reflect")
6565
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
66-
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.6")
66+
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.8")
6767
implementation("com.google.zxing:core:3.5.3")
6868
implementation("com.google.zxing:javase:3.5.3")
6969
implementation("io.jsonwebtoken:jjwt-api:0.12.6")
@@ -77,7 +77,7 @@ dependencies {
7777
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
7878
runtimeOnly("com.h2database:h2")
7979
implementation("org.postgresql:postgresql")
80-
implementation(platform("io.micrometer:micrometer-bom:1.14.6"))
80+
implementation(platform("io.micrometer:micrometer-bom:1.15.0"))
8181
implementation("io.micrometer:micrometer-core")
8282
implementation("io.micrometer:micrometer-registry-prometheus")
8383
implementation("io.micrometer:micrometer-observation")

backend/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-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

backend/src/main/kotlin/hu/bme/sch/cmsch/config/SecurityConfig.kt

Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest
3535
import org.springframework.security.oauth2.core.oidc.user.DefaultOidcUser
3636
import org.springframework.security.oauth2.core.user.DefaultOAuth2User
3737
import org.springframework.security.web.SecurityFilterChain
38-
import org.springframework.security.web.util.matcher.AntPathRequestMatcher.antMatcher
3938
import org.springframework.web.reactive.function.client.WebClient
4039
import java.util.*
4140

@@ -74,51 +73,51 @@ open class SecurityConfig(
7473
fun securityFilterChain(http: HttpSecurity): SecurityFilterChain {
7574
http.authorizeHttpRequests {
7675
it.requestMatchers(
77-
antMatcher("/"),
78-
antMatcher("/error"),
79-
antMatcher("/403"),
80-
antMatcher("/404"),
81-
antMatcher("/control/loggedin"),
82-
antMatcher("/control/login"),
83-
antMatcher("/control/logged-out"),
84-
antMatcher("/control/post-login"),
85-
antMatcher("/style4.css"),
86-
antMatcher("/flatpickr_custom.css"),
87-
antMatcher("/tabulator_simple.css"),
88-
antMatcher("/tabulator_simple.min.css.map"),
89-
antMatcher("/control/test-user"),
90-
antMatcher("/images/**"),
91-
antMatcher("/js/**"),
92-
antMatcher("/docs-icons/**"),
93-
antMatcher("/files/**"),
94-
antMatcher("/admin/logout"),
95-
antMatcher("/countdown"),
96-
antMatcher("/control/logout"),
97-
antMatcher("/control/test"),
98-
antMatcher("/control/open-site"),
99-
antMatcher("/api/**"),
100-
antMatcher("/remote-api/**"),
101-
antMatcher("/share/**"),
102-
antMatcher("/swagger-ui.html"),
103-
antMatcher("/swagger-ui/**"),
104-
antMatcher("/v3/api-docs/**"),
105-
antMatcher("/${StorageService.OBJECT_SERVE_PATH}/**"),
106-
antMatcher("/manifest/manifest.json"),
107-
antMatcher("/control/refresh"),
108-
antMatcher("/oauth2/authorization"),
109-
antMatcher("/c/**"),
110-
antMatcher("/ol.js"),
111-
antMatcher("/ol.css"),
112-
antMatcher("/tracker.css"),
113-
antMatcher("/scanner.css"),
114-
antMatcher("/redirect/beacon"),
115-
antMatcher("/actuator/prometheus"),
116-
antMatcher("/actuator/health/liveness"),
117-
antMatcher("/actuator/health/readiness"),
76+
"/",
77+
"/error",
78+
"/403",
79+
"/404",
80+
"/control/loggedin",
81+
"/control/login",
82+
"/control/logged-out",
83+
"/control/post-login",
84+
"/style4.css",
85+
"/flatpickr_custom.css",
86+
"/tabulator_simple.css",
87+
"/tabulator_simple.min.css.map",
88+
"/control/test-user",
89+
"/images/**",
90+
"/js/**",
91+
"/docs-icons/**",
92+
"/files/**",
93+
"/admin/logout",
94+
"/countdown",
95+
"/control/logout",
96+
"/control/test",
97+
"/control/open-site",
98+
"/api/**",
99+
"/remote-api/**",
100+
"/share/**",
101+
"/swagger-ui.html",
102+
"/swagger-ui/**",
103+
"/v3/api-docs/**",
104+
"/${StorageService.OBJECT_SERVE_PATH}/**",
105+
"/manifest/manifest.json",
106+
"/control/refresh",
107+
"/oauth2/authorization",
108+
"/c/**",
109+
"/ol.js",
110+
"/ol.css",
111+
"/tracker.css",
112+
"/scanner.css",
113+
"/redirect/beacon",
114+
"/actuator/prometheus",
115+
"/actuator/health/liveness",
116+
"/actuator/health/readiness",
118117
).permitAll()
119118

120119
it.requestMatchers(
121-
antMatcher("/control/open-site"),
120+
"/control/open-site",
122121
).hasAnyRole(
123122
RoleType.BASIC.name,
124123
RoleType.STAFF.name,
@@ -129,8 +128,8 @@ open class SecurityConfig(
129128
)
130129

131130
it.requestMatchers(
132-
antMatcher("/admin/**"),
133-
antMatcher("/${StorageService.OBJECT_SERVE_PATH}/**")
131+
"/admin/**",
132+
"/${StorageService.OBJECT_SERVE_PATH}/**",
134133
).hasAnyRole(
135134
RoleType.STAFF.name,
136135
RoleType.ADMIN.name,
@@ -165,12 +164,12 @@ open class SecurityConfig(
165164
countdownConfigurer.ifPresent { http.with(it, Customizer.withDefaults()) }
166165
http.csrf {
167166
it.ignoringRequestMatchers(
168-
antMatcher("/api/**"),
169-
antMatcher("/remote-api/**"),
170-
antMatcher("/admin/api/**"),
171-
antMatcher("/admin/sell/**"),
172-
antMatcher("/admin/admission/**"),
173-
antMatcher("/${StorageService.OBJECT_SERVE_PATH}/**")
167+
"/api/**",
168+
"/remote-api/**",
169+
"/admin/api/**",
170+
"/admin/sell/**",
171+
"/admin/admission/**",
172+
"/${StorageService.OBJECT_SERVE_PATH}/**",
174173
)
175174
}.cors(Customizer.withDefaults())
176175
return http.build()

backend/src/main/kotlin/hu/bme/sch/cmsch/service/FilesystemStorageService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class FilesystemStorageService(
126126
private fun constructObjectUrl(path: String, name: String) = constructObjectUrl(getObjectName(path, name))
127127

128128
private fun constructObjectUrl(fullName: String): String =
129-
UriComponentsBuilder.fromHttpUrl(applicationComponent.adminSiteUrl.getValue())
129+
UriComponentsBuilder.fromUriString(applicationComponent.adminSiteUrl.getValue())
130130
.pathSegment(StorageService.OBJECT_SERVE_PATH, fullName)
131131
.build()
132132
.toUriString()

backend/src/main/kotlin/hu/bme/sch/cmsch/service/S3StorageService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class S3StorageService(
4242
}
4343

4444
private fun getS3PublicUrl(fullName: String) =
45-
UriComponentsBuilder.fromHttpUrl(startupPropertyConfig.s3PublicEndpoint)
45+
UriComponentsBuilder.fromUriString(startupPropertyConfig.s3PublicEndpoint)
4646
.pathSegment(startupPropertyConfig.s3Bucket, fullName)
4747
.build()
4848
.toUriString()

backend/src/main/resources/config/application-docker.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ spring.devtools.add-properties=false
33
spring.datasource.driverClassName=org.h2.Driver
44
spring.datasource.username=sa
55
spring.datasource.password=password
6-
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
76
spring.h2.console.enabled=false
87
spring.jpa.hibernate.ddl-auto=update

backend/src/main/resources/config/application-postgres.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ spring.datasource.url=jdbc:postgresql://${POSTGRES_IP:localhost:5432}/${POSTGRES
22
spring.datasource.username=${POSTGRES_USER:psqluser}
33
spring.datasource.password=${POSTGRES_PW:psqlpw}
44
spring.jpa.hibernate.ddl-auto=${POSTGRES_DDL:update}
5-
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
65
spring.datasource.driverClassName=org.postgresql.Driver

backend/src/main/resources/config/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ spring.profiles.include=${CMSCH_SPRING_PROFILES:}
22
server.error.include-stacktrace=always
33
spring.threads.virtual.enabled=true
44
hu.bme.sch.cmsch.startup.sysadmins=${SYSADMINS:6af3c8b0-592c-6864-8dd9-5f354edfc0be}
5+
spring.jpa.open-in-view=false
56

67
spring.session.jdbc.initialize-schema=always
78
spring.session.jdbc.schema=classpath:org/springframework/session/jdbc/schema-@@platform@@.sql
@@ -61,7 +62,6 @@ hu.bme.sch.cmsch.startup.increased-session-time=172800
6162
spring.datasource.driverClassName=org.h2.Driver
6263
#spring.datasource.username=sa
6364
#spring.datasource.password=password
64-
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
6565
#spring.datasource.url=jdbc:h2:file:./temp/db
6666
spring.h2.console.enabled=false
6767
spring.jpa.hibernate.ddl-auto=update

0 commit comments

Comments
 (0)