Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-admin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-boot-admin
Commits
0746c6b7
Commit
0746c6b7
authored
Dec 27, 2016
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add profile to sample for disabling security
parent
7602ce3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
SpringBootAdminApplication.java
...de/codecentric/boot/admin/SpringBootAdminApplication.java
+2
-0
application.yml
...ring-boot-admin-sample/src/main/resources/application.yml
+22
-0
No files found.
spring-boot-admin-samples/spring-boot-admin-sample/src/main/java/de/codecentric/boot/admin/SpringBootAdminApplication.java
View file @
0746c6b7
...
...
@@ -22,6 +22,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
...
...
@@ -40,6 +41,7 @@ public class SpringBootAdminApplication {
SpringApplication
.
run
(
SpringBootAdminApplication
.
class
,
args
);
}
@Profile
(
"secure"
)
// tag::configuration-spring-security[]
@Configuration
public
static
class
SecurityConfig
extends
WebSecurityConfigurerAdapter
{
...
...
spring-boot-admin-samples/spring-boot-admin-sample/src/main/resources/application.yml
View file @
0746c6b7
---
info
:
scm-url
:
"
@scm.url@"
build-url
:
"
http://travis-ci.org/@env.TRAVIS_REPO_SLUG@/builds/@env.TRAVIS_BUILD_ID@"
...
...
@@ -15,6 +16,27 @@ spring:
boot
:
admin
:
url
:
http://localhost:8080
profiles
:
active
:
-
secure
---
spring
:
profiles
:
insecure
management
:
security
:
enabled
:
false
security
:
basic
:
enabled
:
false
---
spring
:
profiles
:
secure
boot
:
admin
:
username
:
"
${security.user.name}"
#These two are needed so that the client
password
:
"
${security.user.password}"
#can register at the protected server api
client
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment