【发布时间】:2021-11-05 02:14:27
【问题描述】:
我使用 tomcat 在 IntelliJ 中创建了一个简单的web-service。
尽管 tomcat 运行没有任何错误,但我无法访问资源。
代码-
@Path("/hello-world")
public class HelloResource {
@GET
@Produces("text/plain")
public String hello() {
return "Hello, World!";
}
}
查看“Hello World”的正确 URL 是什么?
【问题讨论】:
-
可能是
http://localhost:8080/hello-world...
标签: java web-services tomcat intellij-idea jakarta-ee