赞
踩
首先移除springboot自带的tomcat依赖,并添加tongweb所需依赖
- <!-- SpringBoot Web容器 -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- <!--排除自带的tomcat依赖-->
- <exclusions>
- <exclusion>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-tomcat</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <!-- 添加tongweb-spring-boot-starter依赖 -->
- <dependency>
- <groupId>com.tongweb.springboot</groupId>
- <artifactId>tongweb-spring-boot-starter-2.x</artifactId>
- <version>7.0.E.6_P7</version>
- </dependency>
- <!-- 添加tongweb其他依赖 -->
- <dependency>
- <groupId>com.tongweb</groupId>
- <artifactId>tongweb-embed-core</artifactId>
- <version>7.0.E.6_P7</version>
- </dependency>
- <dependency>
- <groupId>com.tongweb</groupId>
- <artifactId>tongweb-embed-el</artifactId>
- <version>7.0.E.6_P7</version>
- </dependency>
- <dependency>
- <groupId>com.tongweb</groupId>
- <artifactId>tongweb-javax-annotation</artifactId>
- <version>1.2.1</version>
- </dependency>
- <dependency>
- <groupId>com.tongweb</groupId>
- <artifactId>tongweb-lic-sdk</artifactId>
- <version>4.5.0.0</version>
- </dependency>
- <!-- 添加javax.servlet依赖(移除tomcat导致) -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>4.0.1</version>
- </dependency>
在resources目录下上传license.dat文件,如图所示
修改application.yml配置文件中的“tomcat”改为“tongweb”,并增加license配置
- server:
- tongweb:
- uri-encoding: UTF-8
- license:
- type: file
- path: classpath:tongweb/license.dat
启动项目,成功啦
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。