背景概述
- 由于業(yè)務(wù)需求,SpringBoot寫的服務(wù)需要將容器從Tomcat更換為Liberty,這里簡單記錄與分享。
- 開發(fā)環(huán)境:Spring Tool Suite 4 (Version: 4.1.1.RELEASE)
- JAVA 1.8
詳細(xì)步驟
- 在STS中安裝Liberty Developement tools
-
點(diǎn)擊 Help > Eclipse MarketPlace ,搜索 websphere
Eclipse Market -
選擇 IBM WebSphere Application Server Liberty Developer Tools,勾選所有features進(jìn)行安裝。安裝Liberty
-
-
配置Server,在Server下點(diǎn)擊Add,添加Liberty服務(wù)即可。Snipaste_2019-03-20_17-54-49.png
- 雙擊 Liberty Server at localhost即可對(duì)其進(jìn)行配置。
- 在項(xiàng)目pom文件中進(jìn)行配置:
<profiles>
<profile>
<id>profileLiberty</id>
<properties>
<profiles.sharedjar.exclude></profiles.sharedjar.exclude>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>


