欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

spring Boot 报错Failed to introspect Class [xxx] from ClassLoader

程序员文章站 2022-06-19 14:58:38
部署到服务器但没有配置maven插件问题原因就是:spring在加载bean时,找不到对应的class文件解决方案: org.springframework.boot spring-boot-maven-plugin // ++++++++ 添加...

因为之前把redis单打成jar包放入一个项目,然后该项目的jar包在cmd命令行运行报错,该问题主要原因是:因为redis包是外部包,spring在加载bean时,找不到对应的class文件,
部署到服务器但没有配置maven插件
解决方案:

<plugins>
    <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
            <fork>true</fork>
            <mainClass>com.power.CrbDockApplication</mainClass>
            <---------添加改行--------->
            <includeSystemScope>true</includeSystemScope>
            <---------添加改行--------->
        </configuration>
    </plugin>
</plugins>

本文地址:https://blog.csdn.net/qq_36582257/article/details/112002208

相关标签: java