【问题标题】:Spring 5 : not able to hit controller When calling from urlSpring 5:从 url 调用时无法点击控制器
【发布时间】:2017-11-30 10:30:48
【问题描述】:
<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>

【问题讨论】:

    标签: java spring model-view-controller


    【解决方案1】:

    发布你的完整程序,你可能在你的 url 映射中做错了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-24
      • 2015-09-12
      • 2014-05-16
      • 1970-01-01
      • 2018-07-12
      • 2018-07-30
      • 2013-03-11
      相关资源
      最近更新 更多