Skip to content

Commit cf9f376

Browse files
committed
#15 Upgraded to SpringBoot 3.5.5
1 parent a71392e commit cf9f376

File tree

12 files changed

+107
-50
lines changed

12 files changed

+107
-50
lines changed

.github/workflows/branch-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: 'branch_build'
22
on:
33
push:
4-
branches-ignore: [ master, release ]
4+
branches-ignore:
5+
- master
6+
- gh-pages
57

68
env:
79
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

.github/workflows/master-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
fi
4141
echo "version=$VERSION" >> $GITHUB_OUTPUT
4242
43-
- uses: s4u/maven-settings-action@v2.8.0
43+
- uses: s4u/maven-settings-action@v4.0.0
4444
with:
4545
servers: |
4646
[{

pom.xml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
</ciManagement>
6565

6666
<properties>
67-
<error_prone_annotations.version>2.38.0</error_prone_annotations.version>
67+
<error_prone_annotations.version>2.40.0</error_prone_annotations.version>
6868
<hk2-api.version>3.1.1</hk2-api.version>
6969
<guava.version>33.0.0-jre</guava.version>
7070
<httpclient.version>4.5.14</httpclient.version>
@@ -200,13 +200,26 @@
200200
<artifactId>micrometer-registry-prometheus</artifactId>
201201
<scope>runtime</scope>
202202
</dependency>
203+
<dependency>
204+
<groupId>io.micrometer</groupId>
205+
<artifactId>micrometer-tracing-bridge-otel</artifactId>
206+
</dependency>
207+
<dependency>
208+
<groupId>io.opentelemetry</groupId>
209+
<artifactId>opentelemetry-exporter-otlp</artifactId>
210+
</dependency>
203211

204212
<!-- 3rd party dependencies -->
205213
<dependency>
206214
<groupId>ch.qos.logback</groupId>
207215
<artifactId>logback-classic</artifactId>
208216
<scope>runtime</scope>
209217
</dependency>
218+
<dependency>
219+
<groupId>com.github.ben-manes.caffeine</groupId>
220+
<artifactId>caffeine</artifactId>
221+
<scope>runtime</scope>
222+
</dependency>
210223
<dependency>
211224
<groupId>com.github.loki4j</groupId>
212225
<artifactId>loki-logback-appender</artifactId>
@@ -223,7 +236,7 @@
223236
</dependency>
224237
<dependency>
225238
<groupId>org.jolokia</groupId>
226-
<artifactId>jolokia-core</artifactId>
239+
<artifactId>jolokia-support-spring</artifactId>
227240
<scope>runtime</scope>
228241
</dependency>
229242

scripts/docker_build_arm64

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
docker build --platform linux/arm64 -t interface21/openwms-services:latest .

scripts/docker_build_release

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

scripts/docker_push_release

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright 2005-2025 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package org.openwms.services;
17+
18+
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter;
19+
import org.springframework.beans.factory.annotation.Value;
20+
import org.springframework.boot.autoconfigure.AutoConfiguration;
21+
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
22+
import org.springframework.context.annotation.Bean;
23+
import org.springframework.context.annotation.Configuration;
24+
25+
/**
26+
* A ServiceRegistryOtlpConfiguration.
27+
*
28+
* @author Heiko Scherrer
29+
*/
30+
@ConditionalOnClass(name = "io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter")
31+
@AutoConfiguration
32+
public class ServiceRegistryOtlpConfiguration {
33+
34+
@Configuration(proxyBeanMethods = false)
35+
@ConditionalOnClass(name = "io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter")
36+
public static class OtelConfiguration {
37+
@ConditionalOnClass(name = "io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter")
38+
public @Bean OtlpGrpcSpanExporter otlpHttpSpanExporter(@Value("${owms.tracing.url}") String url) {
39+
return OtlpGrpcSpanExporter.builder().setEndpoint(url).build();
40+
}
41+
}
42+
}

src/main/java/org/openwms/services/WebSecurityConfig.java renamed to src/main/java/org/openwms/services/WebSecurityConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
import static org.springframework.security.config.Customizer.withDefaults;
2828

2929
/**
30-
* A WebSecurityConfig.
30+
* A WebSecurityConfiguration.
3131
*
3232
* @author Heiko Scherrer
3333
*/
3434
@Configuration
35-
public class WebSecurityConfig {
35+
public class WebSecurityConfiguration {
3636

3737
@Profile("SECURED")
3838
@Bean

src/main/resources/META-INF/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2005-2024 the original author or authors.
1+
Copyright 2005-2025 the original author or authors.
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

src/main/resources/application.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@ owms:
1313
srv:
1414
hostname: localhost
1515
protocol: http
16+
tracing:
17+
url: http://localhost:4317
1618

1719
server:
1820
port: ${PORT:8761}
1921

2022
# https://medium.com/@fahimfarookme/the-mystery-of-eureka-self-preservation-c7aa0ed1b799
2123
eureka:
2224
client:
23-
register-with-eureka: false # default is true
2425
fetch-registry: false # default is true
2526
healthcheck:
2627
enabled: false
2728
instance-info-replication-interval-seconds: 30 # default is 30
29+
register-with-eureka: false # default is true
2830
service-url:
2931
defaultZone: ${owms.eureka.zone} # Must be camelCase
3032
server:
@@ -51,55 +53,54 @@ eureka:
5153
renewal-percent-threshold: 0.49 # default is 0.85
5254
peer-node-read-timeout-ms: 1000 # default is 200
5355
instance:
54-
secure-port-enabled: false
55-
non-secure-port-enabled: true
5656
metadata-map:
5757
# hostname: ${owms.srv.hostname} # to avoid 401 batch update errors
5858
password: ${spring.security.user.password}
5959
protocol: ${owms.srv.protocol}
6060
username: ${spring.security.user.name}
6161
zone: ${owms.eureka.zone}
62+
prometheus.scrape: "true"
63+
prometheus.path: "/actuator/prometheus"
64+
prometheus.port: ${server.port}
65+
non-secure-port-enabled: true
66+
secure-port-enabled: false
67+
68+
info:
69+
scm-url: "@scm.url@"
70+
build-url: "@ciManagement.url@"
6271

6372
management:
6473
endpoints:
6574
web:
6675
exposure:
6776
include: "prometheus"
77+
info:
78+
git:
79+
mode: simple
80+
metrics:
81+
distribution:
82+
percentiles-histogram:
83+
greeting: true
84+
http:
85+
server:
86+
requests: true
87+
tags:
88+
application: ${spring.application.name}
89+
otlp:
90+
tracing:
91+
endpoint: ${owms.tracing.url}
92+
prometheus:
93+
metrics:
94+
export:
95+
enabled: true
6896
server:
6997
port: ${MGMTPORT:8990}
98+
tracing:
99+
sampling:
100+
probability: 1.0
70101

71102
---
72103
spring:
73104
config:
74105
activate:
75106
on-profile: SECURED
76-
77-
---
78-
spring:
79-
config:
80-
activate:
81-
on-profile: HEROKU
82-
main:
83-
banner-mode: "OFF"
84-
85-
owms:
86-
srv:
87-
protocol: https
88-
hostname: openwms-services.herokuapp.com
89-
90-
eureka:
91-
server:
92-
eviction-interval-timer-in-ms: 0
93-
wait-time-in-ms-when-sync-empty: 0
94-
client:
95-
register-with-eureka: false
96-
fetch-registry: false
97-
service-url:
98-
defaultZone: ${owms.eureka.url}/eureka/ # Must be camelCase
99-
instance:
100-
secure-port-enabled: true
101-
non-secure-port-enabled: false
102-
status-page-url: ${owms.srv.protocol}://${eureka.instance.hostname}:${server.port}/actuator/info
103-
health-check-url: ${owms.srv.protocol}://${eureka.instance.hostname}:${server.port}/actuator/health
104-
home-page-url: ${owms.srv.protocol}://${eureka.instance.hostname}:${server.port}/actuator/
105-

0 commit comments

Comments
 (0)