常见问题大全

发布于:2025-03-05 ⋅ 阅读:(15) ⋅ 点赞:(0)

排除第三方jar包的Bean

     <dependency>
            <groupId>com.fdada.das</groupId>
            <artifactId>studj</artifactId>
            <version> 0.1.1-SNAPSHOT</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-autoconfigure</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

扫描包扫不到

@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class },scanBasePackages = {"com.saj.student.**","com.saj.teacher.**"})
@EnableAutoConfiguration(exclude = { FreeMarkerAutoConfiguration.class })
@EsMapperScan("com.saj.student.zi.esmapper")
@EnableScheduling
@EnablesajOpEventBus
@ComponentScan(basePackages = {"com.saj.student.mapper","com.saj.**"})
public class RuoYiApplication
{
    public static void main(String[] args)
    {
        // System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(RuoYiApplication.class, args);
        System.out.println("(♥◠‿◠)ノ゙  若依启动成功   ლ(´ڡ`ლ)゙  \n" +
                " .-------.       ____     __        \n" +
                " |  _ _   \\      \\   \\   /  /    \n" +
                " | ( ' )  |       \\  _. /  '       \n" +
                " |(_ o _) /        _( )_ .'         \n" +
                " | (_,_).' __  ___(_ o _)'          \n" +
                " |  |\\ \\  |  ||   |(_,_)'         \n" +
                " |  | \\ `'   /|   `-'  /           \n" +
                " |  |  \\    /  \\      /           \n" +
                " ''-'   `'-'    `-..-'              ");
    }
}

构建失败

一般是pom文件的问题,没刷新/没有重新使用小锤子重构

pom已经注释第三方依赖,模块仍有该依赖

直接去maven仓库,删掉整个模块,并刷新整个maven