springboot 打jar包报错缺少main方法、No auto configuration classes found in META-INF/spring.factories

今天工作遇到个小插曲,springboot打jar老是报错:No auto configuration classes found in META-INF/spring.factories。下午一直没搞定,晚上回来再看就灵光一闪,果然得放松一下再处理问题。记录一下自己遇到的坑,希望也能帮助看到帖子的人!



    4.0.0

    com.ankang.hospital
    operation
    1.0-SNAPSHOT
    jar

    
        
        2.3.5.RELEASE
    

    
        
            org.springframework.boot
            spring-boot-starter-web
            
            ${spring-boot.version}
        

        
            org.projectlombok
            lombok
            1.18.16
        

        
            org.apache.httpcomponents.client5
            httpclient5
            5.1.3
        
    


    
        

            
                org.springframework.boot
                spring-boot-maven-plugin
                ${spring-boot.version}
                
                    true
                    com.ankang.hospital.HospitalApplication
                
                
                    
                        
                            repackage
                        
                    
                
            
        
    

你可能感兴趣的:(spring,spring,boot,jar)