Не найдено сопоставление для HTTP-запроса с URI [] в DispatcherServlet с ошибкой name 'dispatcherServlet' при развертывании в Jboss 6.4 - PullRequest
0 голосов
/ 12 сентября 2018

Когда я пытаюсь развернуть свой проект в jboss 6.4, он развернут, и когда запрос с URL-адресом дает ошибку, не найдено сопоставление для HTTP-запроса с URI в DispatcherServlet с именем dispatcherServlet.Я использую весеннюю загрузку версии 1.4.7.RELEASE.

15:11:08,693 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
15:11:08,693 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) started in 8962ms - Started 519 of 557 services (60 services are lazy, passive or on-demand)
15:11:25,429 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/mobitel-merchant-app]] (http-/127.0.0.1:8080-1) Initializing Spring FrameworkServlet 'dispatcherServlet'
15:11:25,430 INFO  [org.springframework.web.servlet.DispatcherServlet] (http-/127.0.0.1:8080-1) FrameworkServlet 'dispatcherServlet': initialization started
15:11:25,444 INFO  [org.springframework.web.servlet.DispatcherServlet] (http-/127.0.0.1:8080-1) FrameworkServlet 'dispatcherServlet': initialization completed in 12 ms
15:11:25,461 INFO  [stdout] (http-/127.0.0.1:8080-1) inside index call controller
15:11:25,478 WARN  [org.springframework.web.servlet.PageNotFound] (http-/127.0.0.1:8080-1) No mapping found for HTTP request with URI [/merchant-app/WEB-INF/views/index.jsp] in DispatcherServlet with name 'dispatcherServlet'
15:11:25,483 ERROR [org.springframework.boot.web.support.ErrorPageFilter] (http-/127.0.0.1:8080-1) Cannot forward to error page for request [/] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false

Это мой pom

  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>lk.merchantApp</groupId>
  <artifactId>merchant-app</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <name>merchant app external</name>

  <properties>

  <java.version>1.8</java.version>

  </properties>


  <parent> 
 <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
 <version>1.4.7.RELEASE</version>
  </parent>


    <dependencies>

  <dependency>
   <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>


            <exclusions>
            <exclusion>
                 <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
             </exclusion>

           <exclusion>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
            </exclusion>

             </exclusions>


    </dependency>







<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
        <scope>provided</scope>
    </dependency>



        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-bundle</artifactId>
            <version>1.8-ea03</version>
        </dependency>



    <dependency>
    <groupId>taglibs</groupId>
    <artifactId>standard</artifactId>
    <version>1.1.2</version>
</dependency>


        <dependency>
    <groupId>org.json</groupId>
    <artifactId>json</artifactId>
    <version>20180130</version>
</dependency>

   <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
    </dependency>



 <dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-api</artifactId>
    <version>2.9.1</version>
</dependency>     










    </dependencies>

     <build>
  <plugins>
  <plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>

  </plugin>

  </plugins>
  </build> 






</project>

и это свойства моего приложения.

 spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
spring.mvc.static-path-pattern=/resources/**

spring.resources.add-mappings=true


server.servlet-path=/*



#web.server.https.port=8090
server.port=8080

Thisмоя структура jboss-deployement-

    <?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
   <deployment>
      <exclusions>
          <module name="org.apache.commons.logging" />
          <module name="org.jboss.as.jaxrs"/>

<module name="org.jboss.resteasy"/>

<module name="org.jboss.resteasy.resteasy-jaxrs"/>
      </exclusions>
   </deployment>
</jboss-deployment-structure>

, а моя jboss-web.xml

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd">
    <context-root>/merchant-app</context-root>
</jboss-web>

Пожалуйста, помогите мне.

...