Nuñito Calzada
Nuñito Calzada

Reputation: 2096

ServletRegistrationBean cannot be resolved in SpringBoot

I am working in 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 last version but after that I can't compile the project anymore because I have this problem:

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

Upvotes: 4

Views: 7807

Answers (1)

Nu&#241;ito Calzada
Nu&#241;ito Calzada

Reputation: 2096

Solved !

org.springframework.boot.context.embedded.ServletRegistrationBean was deprecated in 1.4 in favour or org.springframework.boot.web.servlet.ServletRegistrationBean. The former was removed in 1.5 since it was deprecated

Upvotes: 9

Related Questions