ServletRegistrationBean cannot be resolved in SpringBoot

I am working on a SpringBoot project based on

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.3.2.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

      

I updated the pom to

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.3.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

      

to have the latest version, but after that I can no longer compile the project because I have this problem:

The import org.springframework.boot.context.embedded.ServletRegistrationBean cannot be 
 resolved

      

+3


source to share


1 answer


Resolved!



org.springframework.boot.context.embedded.ServletRegistrationBean

deprecated in 1.4 in favor of or org.springframework.boot.web.servlet.ServletRegistrationBean

. The first one was removed in 1.5 as it is deprecated

+6


source







All Articles