133. Changes of Spring Boot ServletRegistrationBean from 1.3.3 to 1.4.1 [Learn Spring Boot from scratch]

The revolution has not yet succeeded, and comrades still need to work hard. Keep fighting Spring Boot . Live to old age, learn old age, and still have more to learn. We only hope that when we need to use knowledge, we don’t want to hate books until we use them. If we lose them every day, there will be piles of them in a year.

 

Origin of need:

In the video of " Spring Boot Servlet ", I used the ServletRegistrationBean class to register servlets , and found that it was different from the original 1.3.3 version.

 

ServletRegistrationBean

Mainly used to customize servlets , such as:

   @Bean

    public ServletRegistrationBean myServlet1(){

       returnnew ServletRegistrationBean(new MyServlet1(), "/myServlet1");

    }

 

Package names

In 1.4.0 , the package name

org.springframework.boot.context.embedded.ServletRegistrationBean

became org.springframework.boot.web.servlet.ServletRegistrationBean _ _ _ _

Need to pay attention.

 

Video & Communication Platform :

à SpringBoot NetEase Cloud Classroom Video 

http://study.163.com/course/introduction.htm?courseId=1004329008

à Spring Boot communication platform 

http://412887952-qq-com.iteye.com/blog/2321532

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327039266&siteId=291194637