Skip to content

Commit a19a280

Browse files
committed
Fix actuator security in samples
Closes spring-projectsgh-7637
1 parent 1f3de10 commit a19a280

File tree

22 files changed

+32
-88
lines changed

22 files changed

+32
-88
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
management.security.enabled=false
2+
13
#
24
# Infinispan configuration file location.
35
#

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

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,12 @@
1818
<main.basedir>${basedir}/../..</main.basedir>
1919
</properties>
2020
<dependencies>
21-
<dependency>
22-
<groupId>org.springframework.boot</groupId>
23-
<artifactId>spring-boot-starter</artifactId>
24-
</dependency>
2521
<dependency>
2622
<groupId>org.springframework.boot</groupId>
2723
<artifactId>spring-boot-starter-data-couchbase</artifactId>
2824
</dependency>
29-
<dependency>
30-
<groupId>org.springframework.boot</groupId>
31-
<artifactId>spring-boot-starter-web</artifactId>
32-
</dependency>
33-
<dependency>
34-
<groupId>org.springframework.boot</groupId>
35-
<artifactId>spring-boot-actuator</artifactId>
36-
</dependency>
37-
<dependency>
25+
26+
<dependency>
3827
<groupId>org.springframework.boot</groupId>
3928
<artifactId>spring-boot-starter-test</artifactId>
4029
<scope>test</scope>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
management.security.enabled=false
2+
13
spring.jpa.hibernate.ddl-auto=validate
24

35
spring.h2.console.enabled=true
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# management.context-path=/admin
2-
spring.http.converters.preferred-json-mapper: gson
2+
management.security.enabled=false
3+
4+
spring.http.converters.preferred-json-mapper=gson

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535

3636
@RunWith(SpringRunner.class)
3737
@SpringBootTest
38-
@TestPropertySource(properties = { "endpoints.hypermedia.enabled: true",
39-
"management.security.enabled: false" })
38+
@TestPropertySource(properties = "endpoints.hypermedia.enabled: true")
4039
public class SampleHypermediaGsonApplicationTests {
4140

4241
@Autowired

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

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
management.security.enabled=false
2+
13
management.context-path=/admin
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# management.context-path=/admin
2+
management.security.enabled=false
3+
24
endpoints.docs.curies.enabled=true

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
<groupId>org.springframework.boot</groupId>
2424
<artifactId>spring-boot-starter-integration</artifactId>
2525
</dependency>
26-
<dependency>
27-
<groupId>org.springframework.boot</groupId>
28-
<artifactId>spring-boot-starter-actuator</artifactId>
29-
</dependency>
3026
<dependency>
3127
<groupId>org.springframework.integration</groupId>
3228
<artifactId>spring-integration-file</artifactId>

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@
2929
<artifactId>spring-boot-starter-tomcat</artifactId>
3030
<scope>provided</scope>
3131
</dependency>
32-
<dependency>
33-
<groupId>org.springframework.boot</groupId>
34-
<artifactId>spring-boot-starter-actuator</artifactId>
35-
</dependency>
32+
3633
<dependency>
3734
<groupId>org.springframework.boot</groupId>
3835
<artifactId>spring-boot-starter-test</artifactId>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
management.security.enabled=false
2+
13
spring.jpa.hibernate.ddl-auto=none
24

35
spring.h2.console.enabled=true
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
service.name: Phil
1+
management.security.enabled=false
2+
3+
service.name=Phil
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
service.name: Phil
2-
metrics.names.tags.process: ${spring.application.name:application}:${random.value:0000}
1+
management.security.enabled=false
2+
3+
service.name=Phil
4+
metrics.names.tags.process=${spring.application.name:application}:${random.value:0000}
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
service.name: Phil
2-
spring.metrics.export.redis.prefix: metrics.sample.${spring.metrics.export.aggregate.prefix}
3-
spring.metrics.export.redis.key: keys.metrics.sample
4-
spring.metrics.export.aggregate.prefix: ${random.value:0000}.${spring.application.name:application}
5-
spring.metrics.export.aggregate.key-pattern: d
6-
spring.jmx.default-domain: org.springframework.boot
1+
management.security.enabled=false
2+
3+
service.name=Phil
4+
spring.metrics.export.redis.prefix=metrics.sample.${spring.metrics.export.aggregate.prefix}
5+
spring.metrics.export.redis.key=keys.metrics.sample
6+
spring.metrics.export.aggregate.prefix=${random.value:0000}.${spring.application.name:application}
7+
spring.metrics.export.aggregate.key-pattern=d
8+
spring.jmx.default-domain=org.springframework.boot
79
spring.data.redis.repositories.enabled=false

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
<groupId>org.springframework.boot</groupId>
2525
<artifactId>spring-boot-starter-web</artifactId>
2626
</dependency>
27-
<dependency>
28-
<groupId>org.springframework.boot</groupId>
29-
<artifactId>spring-boot-starter-actuator</artifactId>
30-
</dependency>
3127
<dependency>
3228
<groupId>org.springframework.boot</groupId>
3329
<artifactId>spring-boot-starter-tomcat</artifactId>

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
<groupId>org.springframework.boot</groupId>
3434
<artifactId>spring-boot-starter-jetty</artifactId>
3535
</dependency>
36-
<dependency>
37-
<groupId>org.springframework.boot</groupId>
38-
<artifactId>spring-boot-starter-actuator</artifactId>
39-
</dependency>
4036
<dependency>
4137
<groupId>org.springframework.boot</groupId>
4238
<artifactId>spring-boot-starter-test</artifactId>

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
<groupId>org.springframework.boot</groupId>
3636
<artifactId>spring-boot-starter-jetty</artifactId>
3737
</dependency>
38-
<dependency>
39-
<groupId>org.springframework.boot</groupId>
40-
<artifactId>spring-boot-starter-actuator</artifactId>
41-
</dependency>
4238
<dependency>
4339
<groupId>org.springframework.boot</groupId>
4440
<artifactId>spring-boot-starter-test</artifactId>

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
<groupId>org.springframework.boot</groupId>
2424
<artifactId>spring-boot-starter-websocket</artifactId>
2525
</dependency>
26-
<dependency>
27-
<groupId>org.springframework.boot</groupId>
28-
<artifactId>spring-boot-starter-actuator</artifactId>
29-
</dependency>
3026
<dependency>
3127
<groupId>org.springframework.boot</groupId>
3228
<artifactId>spring-boot-starter-test</artifactId>

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
<groupId>org.springframework.boot</groupId>
3434
<artifactId>spring-boot-starter-undertow</artifactId>
3535
</dependency>
36-
<dependency>
37-
<groupId>org.springframework.boot</groupId>
38-
<artifactId>spring-boot-starter-actuator</artifactId>
39-
</dependency>
4036
<dependency>
4137
<groupId>org.springframework.boot</groupId>
4238
<artifactId>spring-boot-starter-test</artifactId>

0 commit comments

Comments
 (0)