環境
- Linux/Ubuntu20.04LTS
- IntelliJ IDEA Community Editon 2021.1
- maven 3.6.3
- jetty 11.0.5
- struts2 2.5.22
瀏覽器插件
Config Browser Plugin 是一個簡單的工具,可幫助在運行時查看應用程序的配置。
這個插件應該只在開發階段使用,並且應該嚴格限制對它的訪問!
特徵
- 加載配置的可瀏覽視圖
- 顯示所有可訪問的操作 URL
方案
- 將 添加 Config Browser Plugin 插件 到lib文件夾或maven依賴,然後訪問:http://localhost:8080/CONTEXT... , 查看當前的動作映射 (CONTEXT為你的web應用名)
<struts2.version>2.5.22</struts2.version>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>${struts2.version}</version>
</dependency>
http://localhost:8080/CONTEXT/config-browser/index.action
參考
- https://struts.apache.org/plu...
説明
- 【遇上雨季,吃定彩虹】 --Layuji
- 由個人整理髮布,編寫過程難免有所遺漏或錯誤,懇請指出,以免誤導大家!