Monday, April 8, 2019
On April 08, 2019 by Kamlesh No comments
Why spring boot was introduced when we had all the comforts of frameworks spring like mvc,hibernate etc
One main reason to remove all the configurations that would take plenty of time to just setup the framework.
Setting up the traditional Spring MVC framework includes
Adding Internal View Resolvers
Setting up Hibernate Session Factory
Connection to Database etc
Sample Code of Component scan and internal view resolver in tradition mvc approach is as shown below
<context:component-scan base-package="com.example.spring.dao"></context:component-scan>
<context:component-scan base-package="com.example.spring.controllers"></context:component-scan>
<context:component-scan base-package="com.example.spring.services"></context:component-scan>
<mvc:annotation-driven/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsps/" />
<property name="suffix" value=".jsp" />
</bean>
Above Code is replaced in just two lines in spring boot using Annotations.
Annotations are widely used in spring boot,All the configurations are replaced by single line annotations, so that the developer can concentrate on business logic rather than spending more time on configuring.
We will see how single line annotations can replace the traditional xml in chapter "Annotations".
One main reason to remove all the configurations that would take plenty of time to just setup the framework.
Setting up the traditional Spring MVC framework includes
Adding Internal View Resolvers
Setting up Hibernate Session Factory
Connection to Database etc
Sample Code of Component scan and internal view resolver in tradition mvc approach is as shown below
<context:component-scan base-package="com.example.spring.dao"></context:component-scan>
<context:component-scan base-package="com.example.spring.controllers"></context:component-scan>
<context:component-scan base-package="com.example.spring.services"></context:component-scan>
<mvc:annotation-driven/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsps/" />
<property name="suffix" value=".jsp" />
</bean>
Above Code is replaced in just two lines in spring boot using Annotations.
Annotations are widely used in spring boot,All the configurations are replaced by single line annotations, so that the developer can concentrate on business logic rather than spending more time on configuring.
We will see how single line annotations can replace the traditional xml in chapter "Annotations".
Subscribe to:
Post Comments (Atom)
Search
AdSense
Recent Posts
Popular Posts
-
WLST Script for checking the health status of Weblogic Domain (Admin/Managed node) After long time writing something about WLST WLST...
-
WLST Script for checking the status of JDBC Datasource in Weblogic WLST has some good features like we can monitor the weblogic dom...
-
WLST Script for Monitoring the JMS status of Weblogic Domain After long time writing something about WLST WLST has some good feature...
-
WLST Server Start The server of a WebLogic domain can be started using different techniques. The best setup depends on the technical re...
-
How to Deploy Application using WLST We can use WLST to quickly deploy an Application in a Weblogic Server. Requirement:- · The ...
-
How to create WebLogic Domain using Domain template: 1. Open an existing domain template (assuming WebLogic Server is installed at c:...
-
Basic concepts of WLST. What is WLST? It is a scripting tool offered by Weblogic. Any way WLST is not only for a sense of control,...
-
Hi All, writing something about OPMN utility with oracle instance and Weblogic. WebLogic Server – Weblogic is J2EE application ...
-
Hadoop Distributed Filesystem (HDFS) Built to support high throughput, streaming reads and writes of extremely large files. NAS ...
-
Before diving into this implementation, I would suggest you to look at Spring Security Introduction first. Let's Start Most of the We...
Recent Posts
Sample Text
Blog Archive
-
▼
2019
(13)
-
▼
April
(13)
- Spring MVC vs Spring Boot
- Spring Security With Spring Boot Example
- What is Spring Security?
- Adding your own implementation in JPA
- Crud Operations using Spring Data JPA
- What is Spring Boot JPA?
- YAML and Application.Properties Configuration in S...
- How Controller works in Spring Boot?
- What is Annotation?
- Setting up Spring Boot
- Why Spring Boot?
- What is Spring Boot?
- Spring Boot Tutorials
-
▼
April
(13)
Total Pageviews
Find Us On Facebook
Powered by Blogger.
0 comments:
Post a Comment