Java 无法访问Intellij自动创建的RestFul web服务服务器
在使用Intellij Idea创建RestFul Web服务(比如helloworld)之后,当我运行服务器时,它会正确运行,它表示服务器正在运行。但是,当我尝试使用我的web浏览器访问它时,它会说您请求的网页不可用 我的web服务有什么问题。? 我刚刚创建了一个基本项目 输出- com.sun.jersey.api.core.ScanningResourceConfig日志类 信息:找到根资源类: 类example.HelloWorld 2013年12月26日下午3:16:09 com.sun.jersey.api.core.ScanningResourceConfig init 信息:找不到提供程序类。 2013年12月26日下午3:16:09 com.sun.jersey.server.impl.application.WebApplicationImpl\u 信息:启动Jersey应用程序,版本“Jersey:1.3 06/17/2010 05:04 PM” 服务器运行 访问:http://localhost:9998/helloworldJava 无法访问Intellij自动创建的RestFul web服务服务器,java,rest,intellij-idea,restful-architecture,Java,Rest,Intellij Idea,Restful Architecture,在使用Intellij Idea创建RestFul Web服务(比如helloworld)之后,当我运行服务器时,它会正确运行,它表示服务器正在运行。但是,当我尝试使用我的web浏览器访问它时,它会说您请求的网页不可用 我的web服务有什么问题。? 我刚刚创建了一个基本项目 输出- com.sun.jersey.api.core.ScanningResourceConfig日志类 信息:找到根资源类: 类example.HelloWorld 2013年12月26日下午3:16:09 com.su
点击return停止…在helloworld类中,可能有如下一行代码
HttpServer server = HttpServerFactory.create("http://localhost:9998/");
将端口号更改为8080,然后再次尝试运行您的Intellij版本是什么?您的程序中是否有任何异常?版本10.0.1我在原始问题中添加了错误消息。