Browse Source

Fix actuator security in samples

Closes gh-7637
pull/7807/head
Stephane Nicoll 9 years ago
parent
commit
a19a28062f
  1. 2
      spring-boot-samples/spring-boot-sample-cache/src/main/resources/application.properties
  2. 15
      spring-boot-samples/spring-boot-sample-data-couchbase/pom.xml
  3. 2
      spring-boot-samples/spring-boot-sample-flyway/src/main/resources/application.properties
  4. 4
      spring-boot-samples/spring-boot-sample-hypermedia-gson/src/main/resources/application.properties
  5. 3
      spring-boot-samples/spring-boot-sample-hypermedia-gson/src/test/java/sample/hypermedia/gson/SampleHypermediaGsonApplicationTests.java
  6. 35
      spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationTests.java
  7. 2
      spring-boot-samples/spring-boot-sample-hypermedia-ui/src/main/resources/application.properties
  8. 2
      spring-boot-samples/spring-boot-sample-hypermedia/src/main/resources/application.properties
  9. 4
      spring-boot-samples/spring-boot-sample-integration/pom.xml
  10. 5
      spring-boot-samples/spring-boot-sample-jersey/pom.xml
  11. 2
      spring-boot-samples/spring-boot-sample-liquibase/src/main/resources/application.properties
  12. 0
      spring-boot-samples/spring-boot-sample-metrics-dropwizard/src/main/java/sample/metrics/dropwizard/HelloWorldProperties.java
  13. 4
      spring-boot-samples/spring-boot-sample-metrics-dropwizard/src/main/resources/application.properties
  14. 0
      spring-boot-samples/spring-boot-sample-metrics-opentsdb/src/main/java/sample/metrics/opentsdb/HelloWorldProperties.java
  15. 6
      spring-boot-samples/spring-boot-sample-metrics-opentsdb/src/main/resources/application.properties
  16. 0
      spring-boot-samples/spring-boot-sample-metrics-redis/src/main/java/sample/metrics/redis/HelloWorldProperties.java
  17. 14
      spring-boot-samples/spring-boot-sample-metrics-redis/src/main/resources/application.properties
  18. 4
      spring-boot-samples/spring-boot-sample-web-static/pom.xml
  19. 4
      spring-boot-samples/spring-boot-sample-websocket-jetty/pom.xml
  20. 4
      spring-boot-samples/spring-boot-sample-websocket-jetty93/pom.xml
  21. 4
      spring-boot-samples/spring-boot-sample-websocket-tomcat/pom.xml
  22. 4
      spring-boot-samples/spring-boot-sample-websocket-undertow/pom.xml

2
spring-boot-samples/spring-boot-sample-cache/src/main/resources/application.properties vendored

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
management.security.enabled=false
#
# Infinispan configuration file location.
#

15
spring-boot-samples/spring-boot-sample-data-couchbase/pom.xml

@ -18,23 +18,12 @@ @@ -18,23 +18,12 @@
<main.basedir>${basedir}/../..</main.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-couchbase</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>

2
spring-boot-samples/spring-boot-sample-flyway/src/main/resources/application.properties

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
management.security.enabled=false
spring.jpa.hibernate.ddl-auto=validate
spring.h2.console.enabled=true

4
spring-boot-samples/spring-boot-sample-hypermedia-gson/src/main/resources/application.properties

@ -1,2 +1,4 @@ @@ -1,2 +1,4 @@
# management.context-path=/admin
spring.http.converters.preferred-json-mapper: gson
management.security.enabled=false
spring.http.converters.preferred-json-mapper=gson

3
spring-boot-samples/spring-boot-sample-hypermedia-gson/src/test/java/sample/hypermedia/gson/SampleHypermediaGsonApplicationTests.java

@ -35,8 +35,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @@ -35,8 +35,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@RunWith(SpringRunner.class)
@SpringBootTest
@TestPropertySource(properties = { "endpoints.hypermedia.enabled: true",
"management.security.enabled: false" })
@TestPropertySource(properties = "endpoints.hypermedia.enabled: true")
public class SampleHypermediaGsonApplicationTests {
@Autowired

35
spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationTests.java

@ -1,35 +0,0 @@ @@ -1,35 +0,0 @@
/*
* Copyright 2012-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sample.hypermedia.jpa;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;
@RunWith(SpringRunner.class)
@SpringBootTest
@WebAppConfiguration
public class SampleHypermediaJpaApplicationTests {
@Test
public void contextLoads() {
}
}

2
spring-boot-samples/spring-boot-sample-hypermedia-ui/src/main/resources/application.properties

@ -1 +1,3 @@ @@ -1 +1,3 @@
management.security.enabled=false
management.context-path=/admin

2
spring-boot-samples/spring-boot-sample-hypermedia/src/main/resources/application.properties

@ -1,2 +1,4 @@ @@ -1,2 +1,4 @@
# management.context-path=/admin
management.security.enabled=false
endpoints.docs.curies.enabled=true

4
spring-boot-samples/spring-boot-sample-integration/pom.xml

@ -23,10 +23,6 @@ @@ -23,10 +23,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-integration</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-file</artifactId>

5
spring-boot-samples/spring-boot-sample-jersey/pom.xml

@ -29,10 +29,7 @@ @@ -29,10 +29,7 @@
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>

2
spring-boot-samples/spring-boot-sample-liquibase/src/main/resources/application.properties

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
management.security.enabled=false
spring.jpa.hibernate.ddl-auto=none
spring.h2.console.enabled=true

0
spring-boot-samples/spring-boot-sample-metrics-dropwizard/src/main/java/sample/metrics/dropwizard/HelloWorldService.java → spring-boot-samples/spring-boot-sample-metrics-dropwizard/src/main/java/sample/metrics/dropwizard/HelloWorldProperties.java

4
spring-boot-samples/spring-boot-sample-metrics-dropwizard/src/main/resources/application.properties

@ -1 +1,3 @@ @@ -1 +1,3 @@
service.name: Phil
management.security.enabled=false
service.name=Phil

0
spring-boot-samples/spring-boot-sample-metrics-opentsdb/src/main/java/sample/metrics/opentsdb/HelloWorldService.java → spring-boot-samples/spring-boot-sample-metrics-opentsdb/src/main/java/sample/metrics/opentsdb/HelloWorldProperties.java

6
spring-boot-samples/spring-boot-sample-metrics-opentsdb/src/main/resources/application.properties

@ -1,2 +1,4 @@ @@ -1,2 +1,4 @@
service.name: Phil
metrics.names.tags.process: ${spring.application.name:application}:${random.value:0000}
management.security.enabled=false
service.name=Phil
metrics.names.tags.process=${spring.application.name:application}:${random.value:0000}

0
spring-boot-samples/spring-boot-sample-metrics-redis/src/main/java/sample/metrics/redis/HelloWorldService.java → spring-boot-samples/spring-boot-sample-metrics-redis/src/main/java/sample/metrics/redis/HelloWorldProperties.java

14
spring-boot-samples/spring-boot-sample-metrics-redis/src/main/resources/application.properties

@ -1,7 +1,9 @@ @@ -1,7 +1,9 @@
service.name: Phil
spring.metrics.export.redis.prefix: metrics.sample.${spring.metrics.export.aggregate.prefix}
spring.metrics.export.redis.key: keys.metrics.sample
spring.metrics.export.aggregate.prefix: ${random.value:0000}.${spring.application.name:application}
spring.metrics.export.aggregate.key-pattern: d
spring.jmx.default-domain: org.springframework.boot
management.security.enabled=false
service.name=Phil
spring.metrics.export.redis.prefix=metrics.sample.${spring.metrics.export.aggregate.prefix}
spring.metrics.export.redis.key=keys.metrics.sample
spring.metrics.export.aggregate.prefix=${random.value:0000}.${spring.application.name:application}
spring.metrics.export.aggregate.key-pattern=d
spring.jmx.default-domain=org.springframework.boot
spring.data.redis.repositories.enabled=false

4
spring-boot-samples/spring-boot-sample-web-static/pom.xml

@ -24,10 +24,6 @@ @@ -24,10 +24,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>

4
spring-boot-samples/spring-boot-sample-websocket-jetty/pom.xml

@ -33,10 +33,6 @@ @@ -33,10 +33,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>

4
spring-boot-samples/spring-boot-sample-websocket-jetty93/pom.xml

@ -35,10 +35,6 @@ @@ -35,10 +35,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>

4
spring-boot-samples/spring-boot-sample-websocket-tomcat/pom.xml

@ -23,10 +23,6 @@ @@ -23,10 +23,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>

4
spring-boot-samples/spring-boot-sample-websocket-undertow/pom.xml

@ -33,10 +33,6 @@ @@ -33,10 +33,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>

Loading…
Cancel
Save