springboot 由 jar包转 war包
来源:互联网 发布:adobe注册机mac打不开 编辑:程序博客网 时间:2024/06/05 13:22
1.pom.xml文件中将jar改为war
2.在pom.xml的dependencies块中加入下面内容
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </dependency>
3.增加类ServletInitializer,继承org.springframework.boot.context.web.SpringBootServletInitializer,重写configure方法,代码如下:
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(MicroserviceSimpleProviderUserApplication.class); }
其中MicroserviceSimpleProviderUserApplication类指的是以jar包形式启动的主类
阅读全文
0 0
- springboot 由 jar包转 war包
- springBoot 由jar包转换为war包
- jar包 war包
- springboot war包部署
- SpringBoot打成war包
- springboot打成war包
- springboot war包导出
- springBoot 打成war包
- idea打包SpringBoot项目打包成jar包和war
- war包与jar包
- JAR包和WAR包
- war包和jar包
- java jar包 war包
- jar包和war包
- jar包 和 war包
- war包和jar包
- jar\war\ear包
- jar、ear、war包
- pymssql操作sqlserver报错的一次处理: Unclosed quotation mark after the character string
- Spring_day01
- Android之内存泄露、内存溢出、内存抖动分析
- 在Weblogic上创建和启动自己的Server
- 想快速全面了解LoRa?看这篇就够了!
- springboot 由 jar包转 war包
- 初探 java反射机制
- SqlServer 时间戳默认值为空时 数据迁移问题
- SpringCloud微服务搭建教程有负载均衡
- 11111111
- 红黑树
- 辩论11如何证明不可能
- inet_ntoa函数
- mysql学习日志一