-1

I understand that @SpringBootApplication is used to mark the main class of a spring application.

Here I see that it "is equivalent to using @Configuration, @EnableAutoConfiguration and @ComponentScan". But why is there needed a @Configuration if it is already made automatically with @EnableAutoConfiguration.

M. Deinum
  • 115,695
  • 22
  • 220
  • 224
webpersistence
  • 894
  • 3
  • 12
  • 29
  • what do you mean by "why is there needed a @Configuration". If you use `@SpringBootApplication` you don't need to use `@Configuration` on that class – pvpkiran Dec 06 '17 at 10:11
  • downvoting because Spring has excellent documentation that you should read before asking a question on STackoverflow. – tkruse Dec 06 '17 at 10:16

1 Answers1

1

@EnableAutoConfiguration means Spring boot will look what libraries you use and try to set up beans accordingly. It has nothing to do with @Configuration.

tkruse
  • 10,222
  • 7
  • 53
  • 80