MVC application using Spring - spring

I developed some Spring MVC Application about 2-3 years ago. I need to develop another web application and I thought about using Spring MVC.
I have to build an application using JSP, Spring Controller and Spring Service (and Hibernate), and deploy it in a WildFly Application Server.
I started Eclipse Mars with STS plugin and the way I used to develop Spring MVC application is now stated as "legacy":
This is exactly the way I used to create the filesytem:
Is MVC Spring and old technology? Do I have to migrate to another Spring library?

Related

Spring Boot and Spring MVC are actually frameworks or not?

I know that the Spring Framework is a Framework, but the emergence of Spring Boot and Spring MVC makes me confused whether it is a framework or just one of the modules that Spring Framework has?
Yes.Spring is the most popular application framework for develop java base web application and spring framework core feature can be use any java application.
Also many people refer to Spring web MVC as a framework.
There is nothing wrong with that.
In other words, the spring web MVC is a part of the spring framework that is designed to implement web part in our application.
spring framework img
The Spring Web model-view-controller (MVC) framework is designed around a DispatcherServlet that dispatches requests to handlers, with configurable handler mappings, view resolution, locale and theme resolution as well as support for uploading files.
Spring Boot Framework is widely used to develop REST APIs
If analyzed in depth Spring Boot is a project that is built on the top of the Spring Framework. It provides an easier and faster way to set up, configure, and run both simple and web-based applications.
In short, Spring Boot is the combination of Spring Framework and Embedded Servers.
spring boot img
read more Web MVC
read more Spring boot

When we load our libraries(business logic) into the spring boot framework then the application is getting overloaded?

We are going to developing a web application using the Spring boot framework. Now, we are an architect for how to build a system. Our team members asked questions like when we load our libraries into the spring boot framework then the application is getting overloaded?
Please help me. Is the application is overloaded or not?

Spring contract-first REST

I have a Spring web application - which doesn't use Spring-based GUI, but Wicket - and I would like to build contract-first REST services.
I already have a contract defined in Swagger and I generate model and API artifacts. Swagger codegen generates either Spring Boot artifacts, or Spring MVC ones.
My intention is to use ideally just a model, and maybe API (controllers) from this generated code. But up to my knowledge/research, there is no simple way to have just simple REST service without MVC/Boot boilerplate.
Therefore my questions are:
Is it possible to build lightweight Spring-based REST service, without having "heavy" dependency of full Spring MVC/Spring Boot?
If not, which approach is more lightweight? Spring Boot, or Spring MVC?
You are misinterpreting the Spring ecosystem.
Spring MVC is THE rest web and web service library within Spring portfolio.
The same way as Spring-WS is THE soap web service library.
They are very similar in architecture and style of use.
The fact that Spring MVC is bundled with Spring Framework does not change the situation.
Spring Boot does not bring any new REST offering. It is just a bootstrap mechanism to start Java web server with web app already deployed from a plain main() method. Therefore if you see "Building REST web services with Spring Boot", it just means that it is Spring MVC bootstrapped by Spring Boot.
Therefore, the question to what is more lightweight is straightforward: Spring MVC.
To answer the question #2:
The usage of Spring MVC is more lighweight, then usage of Spring Boot:
Size of the WAR archive:
6,1 MB for Spring MVC
9,2 MB for Spring Boot
Number of libraries in WAR archive:
12 for Spring MVC
28 for Spring Boot

Spring boot for legacy Struts application

I have come across couple of discussions here about Spring Boot setup for Struts application but did not get a valid yes or no.
I know we can migrate the struts to spring and then use it with Spring boot but considering the timelines and application complexity we need to just migrate from Legacy Websphere to Spring boot for the Struts application.
Can we integrate spring boot with a legacy Struts 1.x application ?
P.S:
So far I am able to start up tomcat for spring boot successfully for my war but I do get 404 on browser so need to understand what would be the flow after the request flow to Main class.

How to integrate Spring application with Mule ESB

I want to integrate my spring (3.0) application with Mule ESB (Mule3) and make available those service for different clients (.Net, GWT etc). For accomplish this, whether I should deploy my Spring application as separate component and define Endpoint on Mule or I can deploy my spring application inside the Mule and provide those services to outside clients. If anyone know some ideas or any sample reference projects related to this problem, can please update me. Thanks.
I would recommend integrating Mule into your Spring application. That is, adding the Mule jar files to your app and using it as a library. Doing it this way Mule adds a child context to your main Spring application context and has access to your beans so they can be used as services.
The Using Mule with Spring and Spring Application Contexts pages are the places to start learning about how to do this.

Resources