zoukankan      html  css  js  c++  java
  • SpringBoot项目不占用端口启动

    @EnableScheduling
    @SpringBootApplication
    public class Application {
    
        public static void main(String[] args) {
            new SpringApplicationBuilder().sources(Application.class).web(false).run(args);
        }
    }

    Starting from Spring Boot 2.0

    -web(false)/setWebEnvironment(false) is deprecated and instead Web-Application-Type can be used to specify

    spring.main.web-application-type=NONE
    @SpringBootApplication
    public class SpringBootDisableWebEnvironmentApplication {
    
        public static void main(String[] args) {
            new SpringApplicationBuilder(SpringBootDisableWebEnvironmentApplication .class)
                .web(WebApplicationType.NONE) // .REACTIVE, .SERVLET
                .run(args);
       }
    }
     

     

    有追求,才有动力!

    向每一个软件工程师致敬!

    by wujf

    mail:921252375@qq.com

  • 相关阅读:
    jqGrid表格控件的学习
    list 集合筛选数据
    MySQL跨域
    11-Index页面
    11-Comment页面
    11-Add页面
    11-UploadFile
    11-控制器UI
    11-控制器
    11-数据访问层
  • 原文地址:https://www.cnblogs.com/wujf/p/9458742.html
Copyright © 2011-2022 走看看