The Baeldung Weekly Review 39
1. Java and Spring >> Spring WebApplicationInitializer and ApplicationContextInitializer confusion Quick and to the point clarification of these 2 concepts – if you’re starting out doing...
View ArticleGuava Cache
1. Overview In this tutorial, we’ll take a look at the Guava Cache implementation – basic usage, eviction policies, refreshing the cache and some interesting bulk operations. Finally, we will take a...
View ArticleThe Baeldung Weekly Review 40
At the very beginning of 2014 I decided to start to track my reading habits and share the best stuff here, on Baeldung. Curating my reading has made it more purposeful and diverse – and I’m hopefully...
View ArticleFiltering and Transforming Collections in Guava
1. Overview In this tutorial, we’ll illustrate how to filter and transform collections with Guava. We will filter using Predicates, transform using the Functions that the library provides and finally,...
View ArticleBaeldung Weekly Review 41
At the very beginning of 2014 I decided to start to track my reading habits and share the best stuff here, on Baeldung. Curating my reading has made it more purposeful and diverse – and I’m hopefully...
View ArticleThe @Scheduled Annotation in Spring
1. Overview In this article we’ll discuss the Spring @Scheduled annotation – we will illustrate how it can be used to configure and schedule tasks. The simple rules that need to be followed to annotate...
View ArticleGuava – Join and Split Collections
1. Overview In this tutorial, we will learn how to use the Joiner and Splitter in the Guava library. We’ll convert collections into a String with the Joiner and we’ll split a String into a collection...
View ArticleGuava – Write to File, Read from File
1. Overview In this tutorial – we will learn how to write to a file and then how to read from a file using Guava IO. We will discuss how to write to file. 2. Write using Files Let’s start with a...
View ArticleBaeldung Weekly Review 42
At the very beginning of 2014 I decided to start to track my reading habits and share the best stuff here, on Baeldung. Curating my reading has made it more purposeful and diverse – and I’m hopefully...
View ArticleBaeldung Weekly Review 43
At the very beginning of 2014 I decided to start to track my reading habits and share the best stuff here, on Baeldung. Curating my reading has made it more purposeful and diverse – and I’m hopefully...
View ArticleJava Timer
1. Timer – The Basics Timer and TimerTask are java util classes used to schedule tasks in a background thread. In a few words – TimerTask is the task to perform and Timer is the scheduler. 2. Schedule...
View ArticleGuava – Lists
1. Overview In this tutorial – we will illustrate the most common and useful ways to work with Lists using the Guava library. Let’s start simple – and take a look at just creating a new ArrayList...
View ArticleGuava – Sets
1. Overview In this tutorial – we will illustrate the most useful ways you can leverage Guava to work with Java Sets. Let’s start very simple and create a HashSet without the new operator, using...
View ArticleBaeldung Weekly Review 44
At the very beginning of 2014 I decided to start to track my reading habits and share the best stuff here, on Baeldung. Curating my reading has made it more purposeful and diverse – and I’m hopefully...
View ArticleMockito – Using Spies
1. Overview In this tutorial – we will illustrate how to make the most out of spies in Mockito. We will talk about the @Spy annotation, how to stub a spy and, finally – we will go into the difference...
View ArticleSpring Profiles
1. Overview In this article we’ll illustrate how to use Profiles in Spring. As of Spring 3.1, we can now map our beans to different profiles – for example dev, test, prod. We can then activate...
View ArticleServe Static Resources with Spring
1. Overview This article explores how to serve static resources with Spring – from the basic XML-based resource mapping introduced since 3.0.x. to the more flexible and efficient alternatives in...
View ArticleSpring Events
1. Overview In this article we’ll be discussing how to use events in Spring. Event are one of the more overlooked functionalities in the framework but also one of the more useful. And – like many...
View ArticleBaeldung Weekly Review 45
At the very beginning of 2014 I decided to start to track my reading habits and share the best stuff here, on Baeldung. Curating my reading has made it more purposeful and diverse – and I’m hopefully...
View ArticleMockito – @Mock, @Spy, @Captor and @InjectMocks
1. Overview In this tutorial, we’ll cover all the annotations in the Mockito library – @Mock, @Spy, @Captor and @InjectMocks . 2. Enable Mockito Annotations First – let’s see how to enable the use of...
View Article