Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 279
Nunyet de Can Calçada Avatar asked Jan 04 '23 03:01

Nunyet de Can Calçada


1 Answers

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

like image 176
Nunyet de Can Calçada Avatar answered Jan 13 '23 08:01

Nunyet de Can Calçada