As I mentioned in my previous post, things were not going smoothly. I got a weird java.lang.reflect.InvocationTargetException which was hard to explain. After some Googling I found an explanation. Turns out the culprit was @Repository annotation in the Repository interfaces which is not needed there. Removing the annotation fixed the issue.
I ran the application and I was able to make REST calls at localhost:8080/resturl. VICTORY!!!
Wait... Not so fast. I need to add v1/ in front resturl for versioning so the call would be like localhost:8080/v1/resturl .
Hmm. For that I needed to register DispatcherServlet and define the mapping:
I also needed to add a custom filter for Dispatcher Servlet. That was easy:
Now I am ready to deploy. But how do I that?
No comments:
Post a Comment