課程
/后端開發(fā)
/Java
/Shiro安全框架入門
沒有? webxml 的選項
2018-11-14
源自:Shiro安全框架入門 4-1
正在回答
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"???????? xmlns="http://java.sun.com/xml/ns/javaee"????????? xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" ???????? id="WebApp_ID" version="3.0">??????? ???? <context-param> ??? ??? ?<param-name>contextConfigLocation</param-name> ??? ??? ?<param-value>classpath*:spring.xml</param-value> ??? ?</context-param>??????? ??? ?<listener> ??? ??? ?<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> ??? ?</listener> ?? ??? ?<listener>? ?? ??? ?<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>?? ?</listener>?? ??? ? <filter>?? ??? ?<filter-name>shiroFilter</filter-name>?? ??? ?<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>??? </filter>?? ???? <filter-mapping>?? ??? ?<filter-name>shiroFilter</filter-name>?? ??? ?<url-pattern>/*</url-pattern>??? </filter-mapping>?? ??? ?<!-- The front controller of this Spring Web application, responsible for handling all application requests -->?? ?<servlet>?? ??? ?<servlet-name>springDispatcherServlet</servlet-name>?? ??? ?<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>?? ??? ?<init-param>?? ??? ??? ?<param-name>contextConfigLocation</param-name>?? ??? ??? ?<param-value>classpath*:spring-mvc.xml</param-value>?? ??? ?</init-param>?? ??? ?<load-on-startup>1</load-on-startup>?? ?</servlet>?? ?<!-- Map all requests to the DispatcherServlet for handling -->?? ?<servlet-mapping>?? ??? ?<servlet-name>springDispatcherServlet</servlet-name>?? ??? ?<url-pattern>/</url-pattern>?? ?</servlet-mapping>?? ??? ?</web-app>
這個web.xml是自己添加的模板(idea),網(wǎng)上有很多教程的。
舉報
從零入門Shiro安全框架
1 回答為什么我的Idea不能直接創(chuàng)建web.xml?
2 回答右鍵new web.xml,怎么新建?
2 回答項目右鍵不能創(chuàng)建web.xml
4 回答請問idea新建web.xml文件時,怎么自動生成xml代碼
1 回答idea如何自動生成web.xml文件
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2019-01-27
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
???????? xmlns="http://java.sun.com/xml/ns/javaee"
????????? xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
???????? id="WebApp_ID" version="3.0">
??????? ?
??? <context-param> ?
?? ??? ?<param-name>contextConfigLocation</param-name> ?
?? ??? ?<param-value>classpath*:spring.xml</param-value> ?
?? ?</context-param>
??????? ?
?? ?<listener> ?
?? ??? ?<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> ?
?? ?</listener>
?? ?
?? ?<listener>
? ?? ??? ?<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
?? ?</listener>
?? ?
?? ? <filter>
?? ??? ?<filter-name>shiroFilter</filter-name>
?? ??? ?<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
??? </filter>
?? ?
??? <filter-mapping>
?? ??? ?<filter-name>shiroFilter</filter-name>
?? ??? ?<url-pattern>/*</url-pattern>
??? </filter-mapping>
?? ?
?? ?<!-- The front controller of this Spring Web application, responsible for handling all application requests -->
?? ?<servlet>
?? ??? ?<servlet-name>springDispatcherServlet</servlet-name>
?? ??? ?<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
?? ??? ?<init-param>
?? ??? ??? ?<param-name>contextConfigLocation</param-name>
?? ??? ??? ?<param-value>classpath*:spring-mvc.xml</param-value>
?? ??? ?</init-param>
?? ??? ?<load-on-startup>1</load-on-startup>
?? ?</servlet>
?? ?<!-- Map all requests to the DispatcherServlet for handling -->
?? ?<servlet-mapping>
?? ??? ?<servlet-name>springDispatcherServlet</servlet-name>
?? ??? ?<url-pattern>/</url-pattern>
?? ?</servlet-mapping>
?? ?
?? ?
</web-app>
2018-11-23
這個web.xml是自己添加的模板(idea),網(wǎng)上有很多教程的。