Commit 13f03523 authored by Alexander Kosarev's avatar Alexander Kosarev 🇦🇺

removed unnecessary TomcatServletWebServerFactory bean definition

parent 0609b93a
package name.alexkosarev.tutorial.note;
import name.alexkosarev.tutorial.note.web.NoteRestController;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.support.GenericApplicationContext;
......@@ -9,7 +8,6 @@ public class NoteBeansContextInitializer implements ApplicationContextInitialize
@Override
public void initialize(GenericApplicationContext applicationContext) {
applicationContext.registerBean(TomcatServletWebServerFactory.class);
applicationContext.registerBean(NoteService.class,
() -> new DefaultNoteService(applicationContext.getBean(NoteCrudRepository.class)));
applicationContext.registerBean(NoteRestController.class);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment