• 由于最近项目需要国产化信创改造,引入东方通tongweb
  1. 联系东方通厂家 ,将依赖导入到maven仓库,并获取嵌入式版license文件
  2. 修改pom.xml,引入依赖,注意springboot版本,这里以springboot2举例

springboot2集成东方通tongweb嵌入式版插图

首先移除springboot自带的tomcat依赖,并添加tongweb所需依赖

		
        
            org.springframework.boot
            spring-boot-starter-web
            
            
                
                    org.springframework.boot
                    spring-boot-starter-tomcat
                
            
        
        
        
            com.tongweb.springboot
            tongweb-spring-boot-starter-2.x
            7.0.E.6_P7
        
        
        
            com.tongweb
            tongweb-embed-core
            7.0.E.6_P7
        
        
            com.tongweb
            tongweb-embed-el
            7.0.E.6_P7
        
        
            com.tongweb
            tongweb-javax-annotation
            1.2.1
        
        
            com.tongweb
            tongweb-lic-sdk
            4.5.0.0
        
        
        
            javax.servlet
            javax.servlet-api
            4.0.1
        

在resources目录下上传license.dat文件,如图所示

springboot2集成东方通tongweb嵌入式版插图(1)

修改application.yml配置文件中的“tomcat”改为“tongweb”,并增加license配置

server:
  tongweb:
    uri-encoding: UTF-8
    license:
      type: file
      path: classpath:tongweb/license.dat

springboot2集成东方通tongweb嵌入式版插图(2)

启动项目,成功啦

springboot2集成东方通tongweb嵌入式版插图(3)

本站无任何商业行为
个人在线分享 » springboot2集成东方通tongweb嵌入式版
E-->