Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot import SpringApplicationContextLoader

I use IntelliJ IDEA and write Spring project.

I added dependency

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

and more related to Spring Boot. I cannot import SpringApplicationContextLoader using:

import org.springframework.boot.test.SpringApplicationContextLoader

But I see many projects on GitHub which use this class.

How can I check current package of this class?

like image 500
user Avatar asked Dec 04 '22 22:12

user


1 Answers

According to javadoc of SpringApplicatioNContextLoader a.4.x it was deprecated in favor of @SpringBootTest or SpringBootContextLoader if absolutely necessary.

like image 72
Sebastian Avatar answered Dec 11 '22 10:12

Sebastian