这有点奇怪,或者可能是我遗漏了一些东西。
我正在使用 Spring Boot 应用程序发布 SOAP 端点。下面是 pom.xml 文件
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> ..................
<parent>
.............
</parent>
<groupId>com.gd</groupId>
<artifactId>sl</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>sl</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
</dependency>
</dependencies> ..........plugin and other stuff.
根据教程,我们只需要 wsdl4j 依赖项即可发布 SOAP 端点。
下面是我的端点类 -
@Endpoint
public class UserDetailsEndpoint {
}
这尽可能简单,但是 eclipse 显示编译错误并且不将 @Endpoint 注释解析为
import org.springframework.ws.server.endpoint.annotation.Endpoint;
可能是什么问题,我错过了什么?