Loading...

SPRING BOOT

09-Sep / 0 COMMENTS

For a decade, Spring framework was and still is the essential part of all Pamet employees’ life. As a company, we strive to improve ourselves on an everyday basis and that is why we always look to make things easier, concurrent and more productive (something rather similar to the Spring Boot philosophy).



One of the biggest criticisms of Spring framework over the years is its orientation to XML metadata configuration which led to the painful bootstrapping of applications built on top of it. As an alternative, Spring JavaConfig has appeared. It allowed developers to configure Spring container and define beans programmatically writing Java code rather than configuring XML. Even though the annotation-based configuration is easier to maintain, the XML-based configuration is still very common and widely used. Spring Boot came as a new attempt to simplify setup of stand-alone Spring based applications as they, when written on top of Spring Boot, need very little Spring configuration.


PROS
Spring Boot lets you package up an application in a standalone JAR file with a fully embedded server. As a result, applications can be started in a traditional way using java – jar or even more traditional: war deployments. One of the main goals of Spring Boot module is to provide faster and widely accessible bootstrap experience for Java applications that use Spring framework. This is achieved by providing numerous features that are common to a large set of enterprise projects. There is no need for XML configuration files. The beans are initialized, configured and wired automatically.



You can use Spring Boot in the same way as any standard Java library, but it is recommended to use build automation tool that supports dependency management. Spring Boot is compatible with Apache Maven 3.2 or above and provides opinionated ‘starter’ POMs to simplify project’s Maven configuration. Maven POM file typically inherits from the spring-boot-starter-parent project and declares dependency to one or more ‘starter’ POMs. Spring Boot’s key advantage lies in configuring resources based on dependencies found in the classpath. For example, if there is a spring-boot-starter-web dependency defined in POM file, Spring Boot will configure Spring MVC with defaults by assuming that you are developing a web application.



In general, Spring Boot makes it easy to create stand-alone applications ready for production that can (literally) “just run”.



CONS
Spring Boot hides most of the details about how some of the core concepts of Spring work. So, if you are new to Spring and want to learn about its background you will probably miss a lot of key concepts that you could acquire by using core Spring modules independently. Spring Boot usage is advised with micro-services but not recommended with large and monolithic based applications.



As a way to contribute to the knowledge distribution, we, the Spring evangelists from Pamet d.o.o., have developed the Spring Framework Course designed for all developers eager to learn about this technology and its core concepts.
We have a limited number of places available, so apply here.



Darko Živanović
Developer @ Pamet