Java EE Weblogic迁移到WildFly 15

时间:2019-03-05 14:59:24

标签: java rest jersey wildfly

我正在尝试将Java EE 7应用程序从WebLogic服务器(在其上运行良好)迁移到WildFly。但是还不清楚Rest的要求是否有效。也许有人碰到过?我展示了配置代码和依赖关系。我将不胜感激。 基本上有关内容类型弹出的错误: 找不到针对媒体类型= text / html的MessageBodyReader;字符集= UTF-8;

jboss-deployment-structure.xml

chart.setOnTouchListener(new View.OnTouchListener() {
    @Override
    public boolean onTouch(View v, MotionEvent event) {
    if(!(chart.getLowestVisibleX() == chart.getXAxis().getAxisMinimum() || chart.getHighestVisibleX() == chart.getXAxis().getAxisMaximum())){
        // Do your work here
        Toast.makeText(getContext(),"Hello Scroll to end check working",Toast.LENGTH_LONG).show();
        return false;
    }
});

pom.xml

jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
 <deployment>
      <exclude-subsystems>
          <subsystem name="jaxrs" />
         <subsystem name="resteasy" />
          <subsystem name="webservices" />
      </exclude-subsystems>
  </deployment>
</jboss-deployment-structure>

休息

 <dependency>
            <groupId>org.glassfish.jersey.containers</groupId>
            <artifactId>jersey-container-servlet</artifactId>
            <version>2.25</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>2.25</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.connectors</groupId>
            <artifactId>jersey-apache-connector</artifactId>
            <version>2.25</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-moxy</artifactId>
            <version>2.25</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-jaxb</artifactId>
            <version>2.25</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-json-jackson</artifactId>
            <version>2.25</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.containers</groupId>
            <artifactId>jersey-container-jetty-servlet</artifactId>
            <version>2.25</version>
        </dependency>

请求

@GET
    @Produces({MediaType.APPLICATION_XML, AbstractFacade.TYPE_JSON_UTF})
    public List<Country> findAll() {
        return countryBeanLocal.findAll();
    }

最有趣的是,重新启动服务器后,它只能工作一次,而第二个则不能。

0 个答案:

没有答案