Improve @Value properties (#2352)

Implement recommendation from https://docs.spring.io/spring-boot/reference/features/external-config.html to use kebab case for @Values:

If you do want to use @Value, we recommend that you refer to property names using their canonical form (kebab-case using only lowercase letters). This will allow Spring Boot to use the same logic as it does when relaxed binding @ConfigurationProperties.

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-04-11 16:46:34 +03:00
committed by GitHub
parent 44dd714fb5
commit 36fa915cbc
5 changed files with 8 additions and 8 deletions

View File

@@ -94,7 +94,7 @@ class ControllerSecurityConfiguration {
@Order(301)
protected SecurityFilterChain filterChainDDI(
final HttpSecurity http,
@Value("${hawkbit.server.security.cors.disableForDdiApi:false}") final boolean disableCorsForDdiApi) throws Exception {
@Value("${hawkbit.server.security.cors.disable-for-ddi-api:false}") final boolean disableCorsForDdiApi) throws Exception {
http
.securityMatcher(DDI_ANT_MATCHERS)
.csrf(AbstractHttpConfigurer::disable);