Remove Autowired annotation

This commit is contained in:
Ana Peterlic 2024-04-12 06:17:17 +02:00
parent 30a5cddce0
commit 4d21f39851
1 changed files with 0 additions and 2 deletions

View File

@ -1,6 +1,5 @@
package com.baeldung.filter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -18,7 +17,6 @@ public class AppConfig {
}
@Bean
@Autowired
public FilterRegistrationBean<LoggingFilterRegistrationBean> loggingFilterRegistration(LoggingService loggingService) {
FilterRegistrationBean<LoggingFilterRegistrationBean> registrationBean = new FilterRegistrationBean<>();
registrationBean.setFilter(new LoggingFilterRegistrationBean(loggingService));