Search code examples
spring-bootproperties-file

How to specify wildcard in application.properties?


I have an application.properties in a Spring Boot application. I want to specify allow all origins via a property called cors.allow.origin

But when I set it as below

cors.allow.origin='*'

and then using the env actuator the property is shown as

cors.allow.origin="'*'"

Is this a known thing in Spring Boot?

I want the property to be displayed as

cors.allowed.origin="*"

Any insights or Spring Boot documentation related to this?


Solution

  • Single quotes are not needed in the properties file. e.g. https://en.wikipedia.org/wiki/.properties