Spring 5:从url调用时无法命中控制器 org.springframework.web.context.ContextLoaderListener 上下文配置位置 /WEB-INF/dispatcher-servlet-context.xml 调度器servlet org.springframework.web.servlet.DispatcherServlet 上下文配置位置 1 调度器servlet / 分析员的数据源 jdbc/ofsaaml javax.sql.DataSource 容器
发布完整的程序后,您可能会在url映射中出错Spring 5:从url调用时无法命中控制器 org.springframework.web.context.ContextLoaderListener 上下文配置位置 /WEB-INF/dispatcher-servlet-context.xml 调度器servlet org.springframework.web.servlet.DispatcherServlet 上下文配置位置 1 调度器servlet / 分析员的数据源 jdbc/ofsaaml javax.sql.DataSource 容器,java,spring,model-view-controller,Java,Spring,Model View Controller,发布完整的程序后,您可能会在url映射中出错 <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" ver
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/dispatcher-servlet-context.xml</param-value>
</context-param>
<servlet>
<servlet-name>dispatcher-servlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher-servlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<resource-ref>
<description>Data source for Analyst</description>
<res-ref-name>jdbc/ofsaaml</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>