A long list of solid pieces this week, starting with some good practices for non-trivial Java projects, to more JDK 9 news and a lot of cool Spring stuff being released.
Baeldung Author
Eugen Paraschiv
I’m a software engineer with a passion for REST, TDD and clean code, Web Security and Data Mining. Baeldung is about all of these and more.
Here's what I've written (so far):
Registration – Activate a New Account by Email
Filed under Spring Security
Verify newly registered users by sending them a verification token via email before allowing them to log in – using Spring Security.
HttpAsyncClient Tutorial
Filed under HTTP Client-Side
HttpAsyncClient Tutorial – send a basic GET request, use the multi-threaded client, set up the client with SSL as well as with a proxy, and finally – do authentication.
Best Java Sites
Filed under Java
The Best actively maintained sites in the Java ecosystem.
Baeldung Weekly Review 47
Filed under Weekly Review
Lot happening in Java land – starting with how to understand and tune your severs. Some very interesting uses of Spring Boot and the new Spring Session project.
Baeldung Weekly Review 46
Filed under Weekly Review
This week we got some visibility into Java 9, a great microservice deck and tips and tricks for using thread pools.
Java – Directory Size
Filed under Java
Calculate the Size of a Directory with Java 6, 7 and 8 as well as Apache Commons IO and Guava.
Guava CharMatcher
Filed under Guava
Use the Guava CharMatcher to work with Strings – remove special chars, validate, trim, collapse, replace and count among other super useful APIs.
Getting Started with Mockito @Mock, @Spy, @Captor and @InjectMocks
Filed under Testing
How to use annotations in Mockito – @Mock, @Spy, @Captor and @InjectMocks and the MockitoJUnitRunner to enable them.
Baeldung Weekly Review 45
Filed under Weekly Review
This week was all about the next version of Java – the language is definitely not standing still. That and a host of useful Spring replays from SpringOne.
Spring Events
Filed under Spring
The Basics of Events in Spring – create a simple, custom Event, publish it and handle it in a listener.
Serve Static Resources with Spring
Filed under Spring MVC
How to map and handle static resources with Spring MVC – use the simple configuration, then the 3.1 more flexible one and finally the new 4.1 resource resolvers.
Spring Profiles
Filed under Spring
How to define and use Profiles in Spring. The 4 ways to enable profiles and their precedence. And a real-world example using profiles.
Baeldung Weekly Review 44
Filed under Weekly Review
This was quite a week and so we have an interesting roundup. Lots of solid Java and Spring articles as well as some other useful pieces on leadership and affecting positive change.
Mockito – Using Spies
Filed under Testing
Making good use of Spies in Mockito, and how spies are different from mocks.
Guava – Maps
Filed under Guava
Working with the Guava Map support to create immutable, sorted, bi and multi maps, as well as other useful map implementations.
Build a REST API with Spring and Java Config
Building a REST Service with Spring and Java based Configuration, HTTP response codes, REST payloads and marshalling, testing.
Guava – Sets
Filed under Guava
Working with Sets in Guava – intersection, union, cartesian product, set of ranges and other useful code samples.
Guava – Lists
Filed under Guava
Work with Lists in Guava – clean duplicates and nulls from the list, reverse it and partition it – or convert it to an ImmutableList.
Java Timer
Filed under Java
Using the Java Timer and TimerTask to get the most out of it. Schedule a delayed one time task, a daily task or just repeat on an interval. Cool beans.