Good afternoon / evening to everyone. Immediately I say that I am on the forums for the first time. I have a rest-service of this type:

@Path("/") public class UserServiceImpl implements UserServiceAble { @GET @Path("/get") public String getSelectedUserName(@PathParam("id") int id) { UsersDao dao = new HibernateUsersDaoImpl(); String res = dao.find(id).getName(); return res; } 

Question: how to run it on the local server (localhost), or what is needed for this. Thanks in advance for the answer!

  • Explain the situation. Where did the service come from? Yes, so that you do not know what to do with it? - Sergey
  • But how? How can you take and write immediately without even the most primitive acquaintance with the basics of the target platform? Same on the first lines of any textbook for beginners is written. Take it, do it, then cum. Through the same, in principle, you can not jump? !! Those. dao, hibernat familiar, but the application server is not? Is there a desktop programmer? Where should this service work? Independent application or as part of (desktop?) Program? - Sergey
  • Just today I started writing on the web. There is no time to understand and watch video courses (deadline is down). If it's not difficult for you, tell me how to do it) - mr.robot
  • These are all sorts of things like rest, and so on. It's from javaee. It is assumed that this works under the control of so-called containers - independent application servers or embedded in other programs. I’m not going to say anything about embedded ones, but for an independent one, you will need some javaee full profile or web profile application server, depending on the features involved. They are not difficult to google, they are all well known and have their own army of adepts. In the simplest case, the finished application is copied to a specific folder and works immediately. - Sergey

0