Submitted by heartin on Sat, 10/22/2016 - 23:43
Submitted by heartin on Sat, 10/22/2016 - 23:41
To understand and to work with Spring Boot better, it is good to have a decent knowledge of Java, Spring framework and one of Maven/Gradle. Note that Spring Boot is just a convenient way to do Spring.
Submitted by heartin on Sat, 09/10/2016 - 23:47
In the previous example, we created a simple standalone application using the dependency spring-boot-starter. In this example, we will convert it into a simple web application with very minimal changes.
Submitted by heartin on Sat, 09/10/2016 - 22:34
Spring Boot can be considered as a new way to create Spring applications with ease. With Spring Boot, you can create standalone applications with an embedded server and you can "just run" them. For instance a web application can be run from your desktop similar to a desktop application.
Spring boot home page @ https://projects.spring.io/spring-boot/ describe itself as follows:
Submitted by heartin on Fri, 09/09/2016 - 06:04
Here I will list out upcoming notes or notes sections (books) on Spring.
Aspect Oriented Programming
Testing with Spring
Transactions with Spring
Spring and Data
Spring Boot Essentials (In progress)
Spring MVC Essentials (In progress)
Submitted by heartin on Fri, 09/09/2016 - 05:56
There are different ways to executing some code during initialization and destruction of a bean. We could do that using InitializingBean interface, but there are better approaches using annotations.
We will see two of such approaches here:
Using initMethod and destroyMethod attributes of the @Bean annotation
Submitted by heartin on Fri, 09/09/2016 - 04:37
Beans in Spring can be either singletons or prototypes. Singleton means that only one instance of the bean will be maintained by the Spring and will be returned every time you call the getBean() method. If you set the scope to prototype, then a new bean will be created every time you call the getBean() method.
The default is singleton. In Java configuration, you can specify that a bean scope is prototype by specifying @Scope("prototype") over the bean definition.
Submitted by heartin on Fri, 09/09/2016 - 01:13
Submitted by heartin on Tue, 09/06/2016 - 20:15
You can configure a Spring application entirely using xml configuration or using a Java configuration. XML configuration was the original configuration approach in Spring. Spring 2.0, which came in 2006, simplified the XML configurations.Spring 2.5, which came in 2007, introduced annotation configurations. Spring 3.2, which came in 2012, introduced Java configuration. You can use annotations to do most of the things along with xml or java configuration. However, you will mostly not see both xml configuration or Java configuration used together.
Submitted by heartin on Tue, 07/05/2016 - 21:03
Below JAX-RS annotations aid in mapping a resource class (a POJO) as a web resource: