We have a Spring Cloud Config, that is set up via application.yml
server:
port: 8070
management: #https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-monitoring.html
endpoints:
web:
exposure:
include: info,health,monitoring,refresh,env,mappings
security:
enabled: "false"
server:
port: 18070
spring:
cloud:
config:
server:
jdbc:
sql: SELECT key,value FROM config.properties WHERE application=? AND profile=? AND label=?
order: 0
datasource:
url: jdbc:postgresql://@db.host@:5432/config_db
username: name
password: @db.name.pwd@
hikari:
connection-timeout: 5000
maximum-pool-size: 10
minimum-idle: 1
idle-timeout: 10000
data-source-properties: ApplicationName=config-server
profiles:
active: jdbc
When the properties are requested,
GET /{application}/{profile}/{label}
we get 405
Http answer instead of 200
and value of the property we want to request.
Why changes with
Dockerfile
build_artifacts:
extends: .gradle.build
-image: ${NEXUS_DEV_REGISTRY}/docker-remote/gradle:6.9.4-jdk11-focal
+image: ${NEXUS_DEV_REGISTRY}/docker-remote/gradle:7.5.0-jdk17-jammy
build.gradle
buildscript {
ext {
-springBootVersion = '2.1.8.RELEASE'
+springBootVersion = '3.1.0'
}
Spring Cloud versions:
implementation 'org.springframework.cloud:spring-cloud-starter-config:4.0.2'
implementation "org.springframework.cloud:spring-cloud-config-server:${springBootVersion}"