我正在尝试在 Camunda BPM 示例项目(embedded-spring-rest)中使用带有 RESTEasy 的异步 HTTP 请求处理功能。为了测试现有的pom 文件是否正常,我将 import 语句 forSuspend
和AsynchronousResponse
in 放在RestProcessEngineDeployment.java
. 但是maven编译失败了。
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project camunda-quickstart-embedded-spring-rest: Compilation failure: Compilation failure:
[ERROR] /home/vagrant/works/eclipse-workspace/camunda-bpm-examples/deployment/embedded-spring-rest/src/main/java/org/camunda/bpm/example/loanapproval/rest/RestProcessEngineDeployment.java:[7,19] cannot find symbol
[ERROR] symbol: class Suspend
[ERROR] location: package javax.ws.rs
[ERROR] /home/vagrant/works/eclipse-workspace/camunda-bpm-examples/deployment/embedded-spring-rest/src/main/java/org/camunda/bpm/example/loanapproval/rest/RestProcessEngineDeployment.java:[8,24] cannot find symbol
[ERROR] symbol: class AsynchronousResponse
[ERROR] location: package javax.ws.rs.core
POM 文件看起来没问题。它包含必要的依赖项:
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.8.Final</version>
</dependency>
web.xml 文件看起来也不错。它包含RESTEasy 用户指南filter
中filter-mapping
的建议。
<filter>
<filter-name>Resteasy</filter-name>
<filter-class>
org.jboss.resteasy.plugins.server.servlet.FilterDispatcher
</filter-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>org.camunda.bpm.example.loanapproval.rest.RestProcessEngineDeployment</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Resteasy</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
我错过了什么吗?关于我如何找出问题的任何线索?