1、背景
????????國家近年來大力推進信息技術應用創新產業(信創),要求關鍵領域采用自主可控的國產軟硬件。Tomcat作為國外開源產品,存在潛在的安全風險和技術依賴。TongWeb作為國產中間件,符合信創目錄要求,滿足政府對數據安全和供應鏈安全的監管要求。
官網地址
https://www.tongtech.com/
2、安裝依賴
安裝到本地倉庫
????????運行 “installAll-8.0.E.3_P2” 安裝腳本,將 lib 下的 jar 包安裝到本地 maven 倉庫。Linux 環境安裝
./installAll-8.0.E.3_P2.sh
安裝到企業私倉
????????使用 “deployAll-8.0.E.3_P2” 腳本,解壓 TongWeb 嵌入式版資源包,并將 lib 目錄中的 jar 包安裝到遠端nexus 或兼容 nexus 企業私有倉庫。????????
deployAll-8.0.E.3_P2.sh [url] [sid]
- url:需要上傳的企業私倉地址。
- 注意:必須輸入企業私倉完整路徑信息。
- sid:maven 的 “setting.xml” 中配置的 <server> 標簽下的 id 信息。
- 注意:必須在 “setting.xml” 中配置企業私倉密鑰信息。
示例
./deployAll-8.0.E.3_P2.sh http://127.0.0.1:8081/nexus/content/repositories/central/ central
3、引入依賴
pom.xml 中直接配置依賴
????????引入依賴?Tongweb-Spring-Boot-Starter,直接在工程的 ?pom.xml 中添加 ?tongweb-spring-boot-starter 和嵌入式版 TongWeb 的依賴,同時,排除掉Spring Boot 自帶的 tomcat 的依賴。以springboot3.x為例
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><exclusions><exclusion><artifactId>spring-boot-starter-tomcat</artifactId><groupId>org.springframework.boot</groupId></exclusion></exclusions>
</dependency>
<!--東方通start-->
<!-- 添加tongweb-spring-boot-starter依賴 -->
<dependency><groupId>com.tongweb.springboot</groupId><artifactId>tongweb-spring-boot-starter-3.x</artifactId><version>8.0.E.3_P2</version>
</dependency>
<!--東方通end-->
4、License 授權認證
????????TongWeb 支持以下兩種授權認證方式:
- 本地認證 - 通過本地 license.dat 文件認證
- 遠程認證 - 通過 License Server 遠程認證
????????本文講的是本地認證。
本地認證
配置 license 存放路徑
????????授權文件(license.dat)放入 “工程/resources” 目錄。
server:tongweb:license:path: classpath:license.dat #配置為 license.dat 存放路徑。type: file #配置為 “file”,表示本地認證。
5、啟動
啟動日志
------------------------------------------------------
------------------< 授 權 證 書 >-------------------
---------------------- 產 品 -----------------------
產 品 TongWeb
版 本 Embed
版 本 號 8.0.E
---------------------- 授 權 -----------------------
授 權 類 型 trial
校 驗 類 型 file
最 大 實 例 數 無 限
生 成 時 間 2025-06-10
授 權 有 效 期 2025-09-10
---------------------- 客 戶 -----------------------
客 戶 東方通
項 目 測試
-------------------------------------------------------
------------------< 授 權 證 書 >-------------------
-------------------------------------------------------
6、參考文檔
000_TongWeb_V8.0嵌入式版_產品介紹_80E3_P2A01.pdf
002_TongWeb_V8.0嵌入式版_JakartaEE標準容器用戶指南_80E3_P2A01.pdf