Home » Tag Archives: Spring

Tag Archives: Spring

Integrate Redis to your Spring project

spring-interview-questions-answers

This article shows how to integrate Redis cache to your spring project through annotation configuration. We will begin with our Gradle configuration. We will use the jedis driver. group 'com.gkatzioura.spring' version '1.0-SNAPSHOT' apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'spring-boot' buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.5.RELEASE") } } jar { baseName = 'gs-serving-web-content' ...

Read More »

Parameterized integration tests with Spring JUnit Rules

junit-logo

Spring 4.2 comes with brand new JUnit rules: SpringClassRule and SpringMethodRule. The main advantage of using JUnit rules is to let developers get rid of SpringJUnit4ClassRunner and utilize different JUnit runners in Spring integration tests. I think the biggest opportunity with Spring JUnit Rules is the ease of creating parameterized integration tests. The code to be tested For the purpose ...

Read More »

Set up a SpringData project using Apache Cassandra

apache-cassandra-logo

On this post we will use Gradle and spring boot in order to create a project that integrates spring-mvc and the Apache Cassandra database. First we will begin with our Gradle configuration group 'com.gkatzioura' version '1.0-SNAPSHOT' apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'spring-boot' buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.5.RELEASE") } } jar ...

Read More »

Making Spring Batch Groovy

spring-interview-questions-answers

Here at Keyhole, we are very fond of Spring Batch. In many Java Enterprise environments, there is still a big need for automating moving data around. Spring Batch gives us a great head start on creating these batch processes. Note: if you’re in the area on Wednesday night (8/5/15), check out Keyhole Managing Partner David Pitt’s Spring Batch presentation at the ...

Read More »

Processing Twitter feed using Spring Boot

spring-interview-questions-answers

In one of my previous posts I already discussed how to process the Twitter sample feed using Apache Storm, and now we’re going to walk through the steps of creating a sample Spring Boot application that reads messages from Twitter sample feed using the Spring Social Twitter framework and writes data to Neo4J using Spring Data Neo4J. The whole project is available ...

Read More »

Building modern web applications using Java and Spring

spring-interview-questions-answers

Creating Java web applications using Spring Framework has never been easier. If you’re already familiar with Java and have little to no experience creating web applications, or if you’re worried that all the cool kids abandoned Java in favor of Ruby and Node.js, you want to read this. My intention is to provide here a practical guide to get up and running quickly on ...

Read More »

Understanding Callable and Spring DeferredResult

spring-interview-questions-answers

1. Introduction Asynchronous support introduced in Servlet 3.0 offers the possibility to process an HTTP request in another thread. This is specially interesting when you have a long running task, since while another thread processes this request, the container thread is freed and can continue serving other requests. This topic has been explained many times, but there seems to be ...

Read More »

Throttle methods with Spring AOP and Guava rate limiter

spring-interview-questions-answers

External services or APIs may have usage limits or they just cannot handle loads of requests without failing. This post explains how to create a Spring Framework based aspect that can be used to throttle any adviced method calls with Guava’s rate limiter. The following implementation requires Java 8, Spring AOP and Guava. Let’s start with an annotation that is ...

Read More »

Learning Spring-Cloud – Writing a microservice

spring-interview-questions-answers

Continuing my Spring-Cloud learning journey, earlier I had covered how to write the infrastructure components of a typical Spring-Cloud and Netflix OSS based micro-services environment – in this specific instance two critical components, Eureka to register and discover services and Spring Cloud Configuration to maintain a centralized repository of configuration for a service. Here I will be showing how I ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.