简体   繁体   English

如何查看服务器RESTful Web服务的所有已发布资源

[英]How to view all the published resources of my server RESTful web services

I've received a sample Java application, which contains some RESTFul web services . 我已经收到一个示例Java应用程序,其中包含一些RESTFul Web服务 I've set it up in eclipse with Tomcat and it's in running state. 我已经在Eclipse中将其设置为Tomcat,并且它处于运行状态。 Unfortunately I haven't received any information about the published Resources. 不幸的是,我还没有收到有关已发布资源的任何信息。 So my question is: How can I find out all the published resources of my app? 所以我的问题是:如何找到应用程序的所有已发布资源? Are they printed in any server logs at the time of server startup? 服务器启动时,它们是否打印在任何服务器日志中?

I have come to know about WADL file which serves my purpose. 我已经知道适合我的WADL文件。 This file is generated automatically by Jersey-2.22 when the application is up & running. 当应用程序启动并运行时,该文件由Jersey-2.22自动生成。 It is accessible by hitting 点击即可访问

http://localhost:8080/<path to application>/application.wadl and http://localhost:8080/<path to application>/application.wadl

http://localhost:8080/<path to application>/application.wadl?detail in detail. http://localhost:8080/<path to application>/application.wadl?detail详细信息。

I've taken localhost because the app is deployed on my local machine and 8080 because app is deployed on Tomcat7 on that port. 我之所以选择localhost是因为该应用程序已部署在本地计算机上,而8080是因为该应用程序已部署在该端口上的Tomcat7上。

Reference: https://jersey.java.net/documentation/latest/wadl.html 参考: https : //jersey.java.net/documentation/latest/wadl.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM