Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
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
DEMO
spring-boot
Commits
b2efef2e
Commit
b2efef2e
authored
Nov 02, 2017
by
Madhura Bhave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect `springSecurityFilterChain` using name
parent
083cf506
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
WebSecurityEnablerConfiguration.java
...toconfigure/security/WebSecurityEnablerConfiguration.java
+2
-4
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/WebSecurityEnablerConfiguration.java
View file @
b2efef2e
...
...
@@ -16,8 +16,6 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
security
;
import
javax.servlet.Filter
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication
;
...
...
@@ -29,14 +27,14 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
* {@link EnableWebSecurity} annotation. This will make
* sure that the annotation is present with default security auto-configuration and also
* if the user adds custom security and forgets to add the annotation. If {@link EnableWebSecurity}
* has already been added or if a
{@link Filter}
with name springSecurityFilterChain
* has already been added or if a
bean
with name springSecurityFilterChain
* has been configured by the user, this will back-off.
*
* @author Madhura Bhave
* @since 2.0.0
*/
@ConditionalOnBean
(
WebSecurityConfigurerAdapter
.
class
)
@ConditionalOnMissingBean
(
value
=
Filter
.
class
,
name
=
"springSecurityFilterChain"
)
@ConditionalOnMissingBean
(
name
=
"springSecurityFilterChain"
)
@ConditionalOnWebApplication
(
type
=
ConditionalOnWebApplication
.
Type
.
SERVLET
)
@EnableWebSecurity
public
class
WebSecurityEnablerConfiguration
{
...
...
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