某馆的项目(人人开源前后端分离版本)需要本地化,去mysql改达梦数据库,去tomcat改为东方通。过程还算顺利,做记录如下,让有同样需求的朋友做个参考。
一、需要的文件
跟需求一起的附件包括:TongWeb工具包.zip、license.dat。
1、根据工具包里的pdf文件对开发编译环境进行更新。idea,jdk1.8,SpringBoot2.x,Wecket2.0。
2、配置修改如下:
a、application.yml
server:
# tomcat:
# uri-encoding: UTF-8
# max-threads: 1000
# min-spare-threads: 30
# port: 8080
# servlet:
# context-path: /xxx
# session:
# cookie:
# http-only: true
tongweb:
license:
type: file
path: D:\\Program\\java\\libs\\license.dat
#注:以上path如果在docker下需要跟yml文件一样挂载到docker,并以docker路径为准
b、platform-framework/pom.xml
//去除内嵌tomcat,引入tongweb包,具体版本按实际修改
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-web</artifactId>-->
<!-- </dependency>-->
<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包 -->
<dependency>
<groupId>com.tongweb.springboot</groupId>
<artifactId>tongweb-spring-boot-starter</artifactId>
<version>2.x.0.RELEASE</version>
</dependency>
<dependency>
<groupId>com.tongweb</groupId>
<artifactId>tongweb-embed</artifactId>
<version>7.0.E.1</version>
</dependency>
c、admin/pom.xml
<dependency>
<groupId>com.tongweb.springboot</groupId>
<artifactId>tongweb-spring-boot-websocket</artifactId>
<version>2.x.0.RELEASE</version>
</dependency>
<dependency>
<groupId>com.tongweb</groupId>
<artifactId>tongweb-embed</artifactId>
<version>7.0.E.1</version>
</dependency>
<dependency>
<groupId>com.tongweb.springboot</groupId>
<artifactId>tongweb-spring-boot-starter</artifactId>
<version>2.x.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 以下是根据项目功能加,看具体使用过程中的报错-->
<!-- 改为tongweb要加的依赖-->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.1.1.Final</version>
</dependency>