这有点奇怪,或者可能是我遗漏了一些东西。我正在使用 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 端点。下面是我的端点类 -@Endpointpublic class UserDetailsEndpoint {}这很简单,但是 Eclipse 显示编译错误并且没有将 @Endpoint 注释解析为import org.springframework.ws.server.endpoint.annotation.Endpoint;可能是什么问题,我错过了什么?
1 回答
FFIVE
TA贡献1797条经验 获得超6个赞
尝试添加此依赖项:
<!-- https://mvnrepository.com/artifact/org.springframework.ws/spring-ws-core -->
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
</dependency>
找到所需依赖项的一种通常成功的方法是简单地搜索“maven <missing-package>”。
在这种情况下,我搜索“maven org.springframework.ws”并找到了这种依赖关系。
添加回答
举报
0/150
提交
取消