Springboot MVC first example

Spring Boot MVC has brought some cool stuff for spring developers.If you had used spring3 (MVC) we had to configure internalresourceviewresolver by our self in spring configuration file.Then write web.xml and load the spring configuration file on class path. The best part for moving to spring boot is to get rid of all the configuration stuff and just focus on…

Read More Read More

Spring Boot +MVC+Jpa mini project

sample application using spring boot ,SpringMVC,JPA,HIbernate. In previous tutorial you have seen how spring3 was intergrating jpa if you would like to revise again please http://www.shivapreals.tech/allpost/spring/spring-with-hibernate-jpa-integration/ Spring3 was great but it had some short coming.In Spring3 we were supposed to declare beans like data source,jpavendoradapter.

Benefits of Spring Boot: It removes boiler plate code such as configuring database,datasource. It…

Read More Read More

TreeSet Vs HashSet

Treeset and hashset both belong to set and obey the rule of maintaining uinique elements . But treeset comes with some more added advantage. TreeSet gives ability to sort elements with the help of the compareTo(). More examples on http://www.shivapreals.tech/allpost/java-tutorial/java-collection-tutorial/ HashSet allows null elements. Treeset never allows null.   Hashset is faster as it is not dealing with sorting of elements. Treeset has sorting capability so it is somewhat slow.   To compare equality hashSet uses equals() while on…

Read More Read More