https安全控制

在web.xml中配置需要https訪問的路徑即可

<security-constraint>
<web-resource-collection>
<web-resource-name>license</web-resource-name>
<url-pattern>/public/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>


<security-constraint> 安全控制標籤

<web-resource-collection>  被保護的資源集合

配置transport-guarantee=CONFIDENTIAL,表示被保護的資源自動由http協議轉換爲https協議


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章