I have an entry in application.properties
x.y = A BC, A BC DEF
This is then initialized using
@ConfigurationProperties(prefix = "x")
@ConfigurationPropertiesScan
@Getter
@Setter
@RequiredArgsConstructor
public class MyProperties {
@NotBlank
private final String[] y;
}
On calling a request the first time (on server restart), the properties when I log x.getY()
as string I get (A BC, A BC DEF), subsequent requests on the other hand get (“A BC”, “A BC DEF”) with extra double quotes wrapping the entries of the array.
So far I have tried escaping with u0020, escaping the whitespace , “A BC”, “A BC DEF”, [A BC, A BC DEF]
How can I ensure I do NOT get the values wrapped in double quotes, i.e – I get (A BC, A BC DEF)?
Spring Boot version – 3.2.3
Java/javac version – 17.0.10
Tdp 17 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.