SpringBoot 啟動報 No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available 異常


maven重新清除編譯文件,執行clean

maven 重新編譯,執行compile

期間報錯,com.sun.xml.internal.messaging.saaj.util 包不存在

需要重新配置一下pom.xml

 

 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArguments>
                        <bootclasspath>C:\Program Files\Java\jdk1.8.0_202\jre\lib\rt.jar</bootclasspath>
                    </compilerArguments>
                </configuration>
  </plugin>

  

完整配置如下

 1 <build>
 2         <plugins>
 3             <plugin>
 4                 <groupId>org.springframework.boot</groupId>
 5                 <artifactId>spring-boot-maven-plugin</artifactId>
 6             </plugin>
 7 
 8             <plugin>
 9                 <groupId>org.apache.maven.plugins</groupId>
10                 <artifactId>maven-compiler-plugin</artifactId>
11                 <configuration>
12                     <source>1.8</source>
13                     <target>1.8</target>
14                     <compilerArguments>
15                         <bootclasspath>C:\Program Files\Java\jdk1.8.0_202\jre\lib\rt.jar</bootclasspath>
16                     </compilerArguments>
17                 </configuration>
18             </plugin>
19 
20         </plugins>
21     </build>

 

重新clean  ,compile 

啟動ok

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM