Я получаю сообщение об ошибке ниже при создании простого веб-сервиса, который возвращает строку "привет"
Страница ошибки Whitelabel В этом приложении нет явного сопоставления для / error, поэтому вы видите это как запасной вариант.
Моя конечная точка веб-сервиса:
@WebService
public class HelloWs {
@WebMethod
public String hello() {
return "hello";
}
}
Мой класс конфигурации:
@Configuration
public class WebServiceConfig {
@Autowired
private Bus bus;
@Bean
public Endpoint endpoint() {
Endpoint endpoint = new EndpointImpl(bus, new HelloWs());
endpoint.publish("/hello");
return endpoint;
}
}
Мои pom.xml
зависимости:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
<version>3.2.7</version>
</dependency>
</dependencies>
Структура моего проекта:
