Submitted by heartin on Sat, 09/10/2016 - 23:47
A Spring Boot application uses the @SpringBootApplication annotation over the main executable class. The SpringApplication.run method call accepts two parameters — the configuration class annotated with @SpringBootApplication annotation and any application arguments.
We will use a simple bean class based on our previous examples. [node:read-more:link]
Submitted by heartin on Sat, 09/10/2016 - 22:34
Spring Boot can help us create Spring applications much faster than otherwise. Spring Boot is based on "conventions over configuration" and you have to do very little in configuring an application. For example, you can create a web application with an embedded server in few minutes and you can "just run" them like a desktop application.
Spring boot home page @ https://projects.spring.io/spring-boot/ describe itself as follows: [node:read-more:link]
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.