在研究SpringBoot2.2.5启动原理的时候,下载SpringApplication.class
类文档的时候,发现报错!出现错误:
解决办法
在项目pom.xml
目录下执行
mvn dependency:resolve -Dclassifier=sources
正常来说,这么就可以解决的,但是我在运行的时候出现了一个bug
No plugin found for prefix 'dependency' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:
\ProgramFiles\maven\apache-maven-3.6.1-bin\MavenRepository), nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public)] -> [Help 1]
在pom.xml
文件中添加:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<!-- configure the plugin here -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>