Here’s a cool jQuery snippet that you can use to create a click counter. The way it works is that each time an element is clicked, the counter (which starts at 0) goes up by one. The counter can be applied to the clicking of any particular elements or multiple elements, and you can choose whether …
Spring Boot Vs Dropwizard
It is always an interesting and exciting task to compare two popular frameworks. This time the contenders are two of the most popular microservices frameworks in Java. In this tutorial, I am going to compare the various aspects of Spring Boot and Dropwizard. I have been working on Spring Boot for almost a year and …
HOW TO Write REST API using DropWizard
This tutorial is beginners guide for learning how to build and deploy your first Dropwizard applications. In this tutorial, I explain the basic concept of dropwizard and how to write a simple REST services using this framework. I have been working on Spring Boot for the last couple of months and very much inspired by …
Spring Boot Configurations
Spring Boot uses application.properties or application.yml for configuring the various application level settings. As we are aware that spring boot works with the opinionated default values that are more sensible to your applications. Most of the time you may prefer to override the default values with your own configurations. In this tutorial I am going …
Firing Events at Spring Boot Startup
One of the common things on web application development is to initialize or invoke a piece of code at the start up of the application. If you are developing a traditional Java web application, the startup logic can be mentioned in the ServletContextListener. Spring also offers very convenient way of invoking the events at the …
@EnableAutoConfiguration Annotation in Spring Boot
@EnableAutoConfiguration annotation auto-configures the beans that are present in the classpath. This simplifies the developers work by guessing the required beans from the classpath and configure it to run the application. This annotation is part of the spring boot project. For example, if you have tomcat-embedded.jar in the classpath, then you will need a TomcatEmbeddedServletContainerFactory …
@EnableCaching Annotation in Spring
@EnableCaching annotation is the annotation-driven cache management feature in the spring framework. This annotation has been added to the spring since the version 3.1. If you are using this annotation, then you are not required to write the XML bean definitions for cache manager. When you annotate your configuration class with @EnableCaching annotation, this triggers …
Caching Support in Spring Boot
This tutorial highlights the new features added as part of the spring boot 1.3.0 for caching support. Caching has been supported by spring boot, but there is no auto configuration option for the caching in spring boot until now. The new Spring Boot release 1.3.0 has introduced the following features that makes easier to use the caching within spring …