duplicate filter registration for 'springsecurityfilterchain' spring boot

duplicate filter registration for 'springsecurityfilterchain' spring boot

Hi,

I have spring boot application and i am deploying the war file on tomcat. Now application does not start and gives:

duplicate filter registration for 'springsecurityfilterchain' spring boot

Error on the boot time.

How to resolve this?

Thanks

View Answers

December 14, 2018 at 12:23 AM

Hi,

This error comes when anyhow AbstractSecurityWebApplicationInitializer is configure twice in your application.

In one of the we were extending the AbstractSecurityWebApplicationInitializer class and not using extended class anywhere. In this scenario ''springSecurityFilterChain'' was reinitializing.

So, we removed the class which was extending AbstractSecurityWebApplicationInitializer and the application issue resolved.

thanks


December 14, 2018 at 12:25 AM

Hi,

If you use Spring Boot then you wont need to initialise AbstractSecurityWebApplicationInitializer .

So, if your application is using the class AbstractSecurityWebApplicationInitializer then simply delete the class which is extending the class AbstractSecurityWebApplicationInitializer .

And this way problem will go away.

Thanks









Related Tutorials/Questions & Answers:
duplicate filter registration for 'springsecurityfilterchain' spring boot
duplicate filter registration for 'springsecurityfilterchain' spring boot ... on tomcat. Now application does not start and gives: duplicate filter registration for 'springsecurityfilterchain' spring boot Error on the boot time. How
Spring Duplicate submit - Spring
Spring Duplicate submit  hi, i have problem in spring, i am pressing back or refresh my request get submitted again what i can do to avoid this,i am using only spring not struts
Advertisements
Spring MVC User Registration example
Spring MVC User Registration example  hi, I am unable to find springMVCUserRegistration example full code can u send me full code of this example   Please visit the following link: Spring MVC USer Registration
Form with a search filter in spring mvc?
Form with a search filter in spring mvc?  Hi I am new to Spring MVC, I have created a spring project which is displaying the list from database... filter where I need to search by transaction id which is one of the field
Form with a search filter in spring mvc?
Form with a search filter in spring mvc?  Hi I am new to Spring MVC, I have created a spring project which is displaying the list from database... filter where I need to search by transaction id which is one of the field
Struts Hibernate Spring - Login and User Registration - Hibernate
/hibernate-spring/index. shtml) but the problem is that Registration doesn't register.... http://www.roseindia.net/struts/hibernate-spring/user-registration-form.shtml...Struts Hibernate Spring - Login and User Registration  Hi All, I
database spring registration form
database spring registration form We are going to discuss about  database spring registration form. We have created simple spring registration form... is the example of simple spring registration form:- We have created this database which
Request for complete code of the Spring 2.5 MVC User Registration Example
Request for complete code of the Spring 2.5 MVC User Registration Example  Hi, The Spring 2.5 MVC User Registration Example is very helpfull to understand the Spring WebMVC flow but it is not complete. Can you please send me
How to make Struts Hibernate and Spring Based Login/Registration Application?
How to make Struts Hibernate and Spring Based Login/Registration Application... in Hibernate. Is there any code for to make Struts Hibernate and Spring Based Login/Registration Application. Thanks   Hibernate struts is perfect choice
Spring, Hibernate login and registration application
Spring, Hibernate login and registration application Spring, Hibernate login... fully function login and registration application in Spring and Hibernate...? Spring web Login form Spring web registration form Validating form
Version of com.allanditzel>spring-security-csrf-token-filter dependency
List of Version of com.allanditzel>spring-security-csrf-token-filter dependency
Spring filter Bean
Spring Filter Bean The auto scan property can be gain through @Component annotation. The same feature you can  get through filter the components in the xml configuration file. In this example you will see how to filter
Is spring boot easy to learn
Is spring boot easy to learn  Hi, I am a software developer... company and they have told me to work learn Spring/Spring Boot. From Next month I have to work on Spring and Spring boot project. So, I have only 1 month time
Is spring boot easy to learn
Is spring boot easy to learn  Hi, I am a software developer... company and they have told me to work learn Spring/Spring Boot. From Next month I have to work on Spring and Spring boot project. So, I have only 1 month time
filter
filter  What is filter? Can filter be used as request or response
spring boot 2.2.6 dependencies
spring boot 2.2.6 dependencies  Hello, Spring boot 2.2.6 is released and now I want to upgrade my project to this version of spring boot. What are the new features that comes with Spring Boot 2.2.6? Thanks
Spring Boot 2.7.0 Released
Spring Boot 2.7.0 Released - Check Spring Boot 2.7.0 new features and updates Yet, another updated version of Spring Boot is here with the release of Spring Boot 2.7.0 that comes with the support for GraphQL, Podman and Cache2k
Spring Boot 2.7.0 Released
Spring Boot 2.7.0 Released - Check Spring Boot 2.7.0 new features and updates Yet, another updated version of Spring Boot is here with the release of Spring Boot 2.7.0 that comes with the support for GraphQL, Podman and Cache2k
spring boot 2.3.1 dependencies
spring boot 2.3.1 dependencies  Hi, There is latest release of Spring boot 2.3.1 and I want to use the same in my project. What is the spring boot 2.3.1 dependencies? I want to try Spring boot 2.3.1 so I need the maven
spring boot webflux dependency
spring boot webflux dependency  Hi, I want to use the webflux in spring boot application. What is the code for adding in pom.xml file? I need pom.xml code for spring boot webflux dependency. Thanks   HI, You can use
duplicate values
duplicate values  My database having cursor that has duplicate values.i want to remove duplicate values through java application
hibernate.archive.autodetection spring boot
hibernate.archive.autodetection option in spring boot? Thanks   Hi...   Hi, Do you want to learn Spring Boot for your next project? Check Spring Boot Tutorials tutorials. Thanks
Maven Dependency spring-security-csrf-token-filter >> 1.1
You should include the dependency code given in this page to add Maven Dependency of com.allanditzel >> spring-security-csrf-token-filter version1.1 in your project
spring boot 2.2.0 maven dependency
spring boot 2.2.0 maven dependency  Hi, I have spring boot old application and now I want to upgrade it to new version of Spring boot. For this I... of Spring boot 2.2.0? What is spring boot 2.2.0 maven dependency? Thanks
Maven Repository/Dependency: com.allanditzel | spring-security-csrf-token-filter
Maven Repository/Dependency of Group ID com.allanditzel and Artifact ID spring-security-csrf-token-filter. Latest version of com.allanditzel:spring-security-csrf-token-filter dependencies. # Version Release
spring boot maven dependency for mysql
spring boot maven dependency for mysql  Hi, I want to add MySQL maven dependency in Spring Boot application. I don't know the version to be added. So what should I add into the pom.xml file of my spring boot application? Thanks
Spring Boot Console Application
Spring Boot Tutorial- Spring Boot Console Application Welcome to the first example of Spring Boot, today we will teach you to create your first application in Spring Boot. As you already know you can create console and web
Spring Boot Console Application
Spring Boot Tutorial- Spring Boot Console Application Welcome to the first example of Spring Boot, today we will teach you to create your first application in Spring Boot. As you already know you can create console and web
Java duplicate elements
Java duplicate elements  Which class has no duplicate elements
JTable duplicate values in row
JTable duplicate values in row  JTable duplicate values in row
What is the best way to learn spring boot
What is the best way to learn spring boot  Hi, I have some experience of working with Spring Core and Spring Web. I want to learn Spring Boot. How anyone can learn the Spring Boot Framework? What is the best way to learn spring
What is the best way to learn spring boot
What is the best way to learn spring boot  Hi, I have some experience of working with Spring Core and Spring Web. I want to learn Spring Boot. How anyone can learn the Spring Boot Framework? What is the best way to learn spring
Spring Boot Tutorials
Spring Boot Tutorials- Learning Spring Boot with examples and sample code After huge success of Spring Framework, Spring team developed Spring Boot which further simplified complex application development process. Spring Boot further
Version of cn.kxlove>spring-boot-beetl dependency
List of Version of cn.kxlove>spring-boot-beetl dependency
Version of org.springframework.boot>spring-boot-starters dependency
List of Version of org.springframework.boot>spring-boot-starters dependency
Version of co.paralleluniverse>comsat-spring-boot dependency
List of Version of co.paralleluniverse>comsat-spring-boot dependency
Version of com.fintonic>versioning-spring-boot dependency
List of Version of com.fintonic>versioning-spring-boot dependency
Version of com.piggsoft>beetl-spring-boot dependency
List of Version of com.piggsoft>beetl-spring-boot dependency
Version of com.replash>replash-spring-boot dependency
List of Version of com.replash>replash-spring-boot dependency
Version of com.restapijs>restapijs-spring-boot dependency
List of Version of com.restapijs>restapijs-spring-boot dependency
Version of com.roncoo>roncoo-spring-boot dependency
List of Version of com.roncoo>roncoo-spring-boot dependency
Version of com.ruijc>spring-boot-parent dependency
List of Version of com.ruijc>spring-boot-parent dependency
Spring Boot Web Starter 2.1.1 Maven dependency
Spring Boot Web Starter 2.1.1 Maven dependency  Hi, I want to use Spring Boot Web Starter 2.1.1 in my spring boot application. My application is based on the old version of Spring Boot. Now will use Spring Boot Web Starter 2.1.1
Spring Boot Tutorials
Spring Boot Tutorials- Learning Spring Boot with examples and sample code After huge success of Spring Framework, Spring team developed Spring Boot which further simplified complex application development process. Spring Boot further
Spring Boot Tutorials
Spring Boot Tutorials- Learning Spring Boot with examples and sample code After huge success of Spring Framework, Spring team developed Spring Boot which further simplified complex application development process. Spring Boot further
ModuleNotFoundError: No module named 'plaster-spring-boot'
ModuleNotFoundError: No module named 'plaster-spring-boot'  Hi, My... named 'plaster-spring-boot' How to remove the ModuleNotFoundError: No module named 'plaster-spring-boot' error? Thanks   Hi
spring boot 2.2.0 m4 maven dependency
spring boot 2.2.0 m4 maven dependency  Hi, I am moving my application to spring boot 2.2.0 m4. Now I want to move my application to new version of spring boot. What is spring boot 2.2.0 m4 maven dependency? Thanks   
ModuleNotFoundError: No module named 'plaster-spring-boot'
ModuleNotFoundError: No module named 'plaster-spring-boot'  Hi, My... named 'plaster-spring-boot' How to remove the ModuleNotFoundError: No module named 'plaster-spring-boot' error? Thanks   Hi
spring boot 2.2.0 m4 maven dependency
spring boot 2.2.0 m4 maven dependency  Hi, I am moving my application to spring boot 2.2.0 m4. Now I want to move my application to new version of spring boot. What is spring boot 2.2.0 m4 maven dependency? Thanks   
Spring 2.5 MVC User Registration Example
Spring MVC User Registration example       Spring 2.5 MVC User Registration Example This tutorial shows you how to create user registration application in Spring MVC. This application

Ads