springboot 运行出现错误 Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.


原因是我将springboot启动类换到了另外一个方法中

出现了一个异常   

 

后来发现因为我换了类但是忘记了换类名所以才报错

@ComponentScan
@EnableAutoConfiguration
public class TestApplication {

    public static void main(String[] args){
        SpringApplication.run(TestApplication.class,args);

    }

}

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM