struts2+;SPRING MVC+;RESTAPI集成。支柱不工作 index.jsp 支柱2 org.apache.struts2.dispatcher.FilterDispatcher 支柱2 *.行动 上下文配置位置 类路径:appContext.xml org.springframework.web.context.ContextLoaderListener 弹簧座 org.springframework.web.servlet.DispatcherServlet 上下文配置位置 类路径:springrest-servlet.xml 1. 弹簧座 /弹簧座/*

struts2+;SPRING MVC+;RESTAPI集成。支柱不工作 index.jsp 支柱2 org.apache.struts2.dispatcher.FilterDispatcher 支柱2 *.行动 上下文配置位置 类路径:appContext.xml org.springframework.web.context.ContextLoaderListener 弹簧座 org.springframework.web.servlet.DispatcherServlet 上下文配置位置 类路径:springrest-servlet.xml 1. 弹簧座 /弹簧座/*,spring,rest,spring-mvc,struts2,Spring,Rest,Spring Mvc,Struts2,RESTAPI运行良好,我尝试使用postman。但是,当我运行应用程序时,struts操作没有调用,每当我在web.xml中使用servlet标记时,struts2就不起作用。我的错误是我使用了struts约定和struts json插件 我正在将RESTAPI与Spring集成。但是struts将调用jst调用的操作。因为pom.xml中包含了这两个插件。错误出现了 谢谢 <?xml version="1.0" encoding="UTF-8"?> <web-app xml

RESTAPI运行良好,我尝试使用postman。但是,当我运行应用程序时,struts操作没有调用,每当我在web.xml中使用servlet标记时,struts2就不起作用。

我的错误是我使用了struts约定和struts json插件

我正在将RESTAPI与Spring集成。但是struts将调用jst调用的操作。因为pom.xml中包含了这两个插件。错误出现了

谢谢

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_4_0.xsd" version="4.0">
    <absolute-ordering />
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:appContext.xml</param-value>
    </context-param>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener
                </listener-class>
    </listener>
    <servlet>
        <servlet-name>springrest</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet
                </servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:springrest-servlet.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>springrest</servlet-name>
        <url-pattern>/springrest/*</url-pattern>
    </servlet-mapping>
</web-app>