Redundant declaration: @SpringBootApplication already applies given @ComponentScan

Advertisements I created a spring boot application(3.0.1). Then I connected the Postgres database and executed it. The application is up on server 8080 smoothly. then I added below-mentioned annotations. @EnableAutoConfiguration @ComponentScan whole file, package com.example.SpringRecap; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController @SpringBootApplication @EnableAutoConfiguration @ComponentScan public class… Read More Redundant declaration: @SpringBootApplication already applies given @ComponentScan