亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

端點無法解析為類型(ws 中的@Endpoint)- Eclipse 編譯錯誤

端點無法解析為類型(ws 中的@Endpoint)- Eclipse 編譯錯誤

RISEBY 2023-09-13 18:04:42
這有點奇怪,或者可能是我遺漏了一些東西。我正在使用 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”并找到了這種依賴關系。


查看完整回答
反對 回復 2023-09-13
  • 1 回答
  • 0 關注
  • 127 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號