0

I want to create an application that is as web-service to deliver results straight from data base procedures or java classes, depending on user request via REST URL.

I want it to be extendable in a way that I won't need to rebuild the WAR file every time a developer creates a new Controller Class . Instead, I should only need to put a .class file in a specific folder and then register the new .class file in a XML Config File of this application.

Is it possible? How can I call this external class from inside the application, create an object based on it and then execute one of it's methods according to user definition in the URL?

With PHP it is much easier because you don't compile it.

NaN
  • 8,596
  • 20
  • 79
  • 153
  • Just a note: I used to code in php, basic, pascal, clipper etc. But I am newly in Java, just did two projects for Android, but now I am moving to web. Please be nice, I don't know (yet) all the resources Java developers have at their disposal. – NaN Jun 24 '16 at 14:21
  • Don't do that. Stick with the usual things java developers do and recompile everything. – zapl Jun 24 '16 at 14:22
  • But I want this application to be a generic web-service for my Angular applications, not an API for a specific application. Does that matter? – NaN Jun 24 '16 at 14:24
  • No, you can use live-reload / hotswap (see http://stackoverflow.com/questions/4553353/change-a-method-at-runtime-via-a-hot-swap-mechanism and http://docs.spring.io/spring-boot/docs/current/reference/html/howto-hotswapping.html#howto-reload-java-classes-without-restarting) during development but I would not do that in a production environment. – zapl Jun 24 '16 at 14:27
  • It is pretty much like this user is asking for in http://stackoverflow.com/questions/205573/at-runtime-find-all-classes-in-a-java-application-that-extend-a-base-class – NaN Jun 24 '16 at 14:39

0 Answers0