I recently started working at a place and they are handling there Java back-end in old 'servlet' style and java scriplet all over the JSP page.
I told one of the person I report to I can do this in Spring MVC as the current product is extremely hacky. He sounded enthusiastic and told me it would be a really good thing to do.
Now, for past three hours, I just can't decide what to use, Spring MVC or Spring Boot? The only reason I want to use Spring MVC is because I'm a bit more familiar with it and I feel by coding more on it, I know what's going on even with the boiler code it comes with. The only thing which is stopping me from using Spring MVC is `@RestController` is giving me huge problems. Because of it, I'm procrastinating and not moving onwards. If I go with Spring Boot, I'm going in for a nose dive because I feel it's wayy too abstract.
Now thinking back, I should go with Spring Boot even if I'm not familiar with it. But I honestly really want it to be done in Spring MVC. There is so much more code involved in that which would make easy to debug, I think.
This is my first time working at a company if that helps. My job is to build an API for a product.
I second @Stephan Van Hulst response. If time frame is not in your favor, I suggest you go with what you feel most comfortable with. However, In my opinion I suggest you do a Proof Of Concept on both and see which works best for the company as far as performance, value, security et cetera goes. I've had to do something similar in my company and the POC did go a long way to helping me come up with a better technology that best fits the business values of the company.
posted 1 year ago
Stephan van Hulst wrote:I recommend you go with MVC. You are more familiar with it, and this is your time to shine. Get more familiar with Boot when working on a hobby project.
What problem is @RestController giving you?
Thanks. I went with Spring MVC and just managed to get bare bone version of it running. @RestController was leading an issue to the servlet-context file. Initially, it took me forever why the import of restController wasn't working eventhough I had a library of it imported. Turns out, I had to tweak the version of it which is used in Maven. I'm working with Maven the first time too which was was another battle to figure out how the file works. But, now I know and know what's going on. The last issue was Java Compiler wasn't set to 1.8 and instead was a 1.6. That also took me a long time to crack.
Now, finally, I can build the thing I'm suppose to with a solid foundation and using a framework I'm happy with, using the annotation which I was introduced by doing Spring Boot tutorial in Spring MVC 4.
posted 1 year ago
And I just realized the sub form is for Swing, not Spring.
If Spring MVC is 'dance' then Spring Boot is the 'dance floor' where Spring-MVC will dance.
Spring MVC has its own dance floor by the way, but Spring Boot is an amazing evolution I believe, it has simplified many things, you will realise as you begin.
I think there a big misunderstanding in that if you use spring boot, you can't use spring mvc. All spring boot does is help with configuration.. that's it. The real question is do you want to do all of the configuration yourself or have the basic stuff setup for you.