Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 354 Vote(s) - 3.51 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spring Boot application can't resolve the org.springframework.boot package

#11
It's not necessary to remove relative path. Just change the version parent of springframework boot. The following version 2.1.2 works successfully.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0

[To see links please register here]

;
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.appsdeveloperblog.app.ws</groupId>
<artifactId>mobile-app-ws</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>mobile-app-ws</name>
<description>Demo project for Spring Boot</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.appsdeveloperblog.app.ws</groupId>
<artifactId>mobile-app-ws</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>

Reply

#12
Mine worked by adding

<!--

[To see links please register here]

-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>

instead of directly using other main dependencies, I have no idea why.
Reply

#13
Solution is change the version of Spring in file pom.xml

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
</parent>

Reply

#14
Delete the repository folder from "C:\Users\usename\.m2" and create again or update maven project.
Reply

#15
This answer may be out of topic for most of readers. In my case the dependency didn't update and "mvn clean" didn't work since my wifi network at the office is highly securised, leaving a "connection timed out". (same respect github pushes and pulls don't work)
I just moved to teathering with my phone and it works.
Stupid, out of topic for most, but it may help some very specific cases.
Reply

#16
I have this problem when using STS. After edited something, I see that, some workspaces
when create a project will happen this problem, and others will not. So I just create a new project in workspaces will not happen.
Reply

#17
After upgrading Spring boot to the latest version - 2.3.3.RELEASE. I also got this error - `Cannot resolve org.springframework.boot:spring-boot-starter-test:unknown`. Maven clean install, updating maven project, cleaning cache do not help.<br>
The solution was adding version placeholder from spring boot parent pom:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring-boot.version}</version>
<scope>test</scope>
</dependency>
Reply

#18
Try this, It might work for you too.

1. Open command prompt and go to the project folder.
2. Build project (For Maven, Run **mvn clean install** and For Gradle, Run **gradle clean build**)
3. After successful build,
- Open your project on any IDE (intellij / eclipse).
- Restart your IDE incase it is already opened.

This worked for me on both v2.1 and v2.4
Reply

#19
For me it was solved after removed the word `.RELEASE`

<version>2.5.3</version>

instead of

<version>2.5.3.RELEASE</version>
Reply

#20
add **<version>${project.parent.version}</version>** in build - plugin section
for spring-boot-maven-plugin and load changes in pom.xml



<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${project.parent.version}</version>
</plugin>
</plugins>
</build>
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through