TongWeb替換tomcat的實現步驟
1、背景
國家近年來大力推進信息技術應用創(chuàng)新產業(yè)(信創(chuàng)),要求關鍵領域采用自主可控的國產軟硬件。Tomcat作為國外開源產品,存在潛在的安全風險和技術依賴。TongWeb作為國產中間件,符合信創(chuàng)目錄要求,滿足政府對數據安全和供應鏈安全的監(jiān)管要求。
官網地址
2、安裝依賴
安裝到本地倉庫
運行 “installAll-8.0.E.3_P2” 安裝腳本,將 lib 下的 jar 包安裝到本地 maven 倉庫。Linux 環(huán)境安裝
./installAll-8.0.E.3_P2.sh
安裝到企業(yè)私倉
使用 “deployAll-8.0.E.3_P2” 腳本,解壓 TongWeb 嵌入式版資源包,并將 lib 目錄中的 jar 包安裝到遠端nexus 或兼容 nexus 企業(yè)私有倉庫。
deployAll-8.0.E.3_P2.sh [url] [sid]
- url:需要上傳的企業(yè)私倉地址。
- 注意:必須輸入企業(yè)私倉完整路徑信息。
- sid:maven 的 “setting.xml” 中配置的 <server> 標簽下的 id 信息。
- 注意:必須在 “setting.xml” 中配置企業(yè)私倉密鑰信息。
示例
./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
到此這篇關于TongWeb替換tomcat的文章就介紹到這了,更多相關TongWeb替換tomcat內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
servlet和tomcat_動力節(jié)點Java學院整理
這篇文章主要介紹了servlet和tomcat,小編覺得挺不錯的,現在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-07-07

