5.0.0.RC2-SNAPSHOT if specify "spring.cloud.config.server.native.searchLocations", properties files are not read

112 views
Skip to first unread message

rafael sánchez bodoque

unread,
Sep 16, 2016, 6:21:14 AM9/16/16
to CAS Community
Hello,

I'm playing with the https://github.com/apereo/cas-overlay-template/tree/5.0 and I'm trying to modify some properties.

I've added src/main/resources/bootstrap.properties (as documentation says) with 

spring.profiles.active=native
spring.cloud.config.server.native.searchLocations=file:///etc/cas/config


I understand, the result would be the same as without this bootstrap.properties file,  for example http://localhost:8080/cas/status would be not allowed because the configuration in etc/cas/config/cas.properties

cas.adminPagesSecurity.ip=127\.0\.0\.1

(build.sh copies it to /etc/cas/config/cas.properties)

But when I add this bootstrap.properties I'm able to access by http://localhost:8080/cas/status and http://127.0.0.1:8080/cas/status
Without the bootstrap.properties I'm only able to access by http://127.0.0.1:8080/cas/status

To reproduce

2) Change to branch 5
3)  execute "./build.sh run"
4) you are not authorized to see http://localhost:8080/cas/status
5) exit "./build.sh run"
6) add src/main/resources/bootstrap.properties with
spring.profiles.active=native
spring.cloud.config.server.native.searchLocations=file:///etc/cas/config
7)  execute "./build.sh run"

I think, this is because in the 7 /etc/cas/config/cas.properties is not read

I've also tried to copy etc/cas/config/cas.properties to src/main/resources/config/cas.properties and change bootstrap.properties to

spring.profiles.active=native
spring.cloud.config.server.native.searchLocations=classpath:/config 

But no luck, the same results

Regards,
Rafa

Reply all
Reply to author
Forward
0 new messages