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.
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):
Verify newly registered users by sending them a verification token via email before allowing them to log in – using Spring Security.
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.
The Best actively maintained sites in the Java ecosystem.
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.
This week we got some visibility into Java 9, a great microservice deck and tips and tricks for using thread pools.
Calculate the Size of a Directory with Java 6, 7 and 8 as well as Apache Commons IO and Guava.
Use the Guava CharMatcher to work with Strings – remove special chars, validate, trim, collapse, replace and count among other super useful APIs.
How to use annotations in Mockito – @Mock, @Spy, @Captor and @InjectMocks and the MockitoJUnitRunner to enable them.
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.
The Basics of Events in Spring – create a simple, custom Event, publish it and handle it in a listener.
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.
How to define and use Profiles in Spring. The 4 ways to enable profiles and their precedence. And a real-world example using profiles.
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.
Making good use of Spies in Mockito, and how spies are different from mocks.
Working with the Guava Map support to create immutable, sorted, bi and multi maps, as well as other useful map implementations.
Building a REST Service with Spring and Java based Configuration, HTTP response codes, REST payloads and marshalling, testing.
Working with Sets in Guava – intersection, union, cartesian product, set of ranges and other useful code samples.
Work with Lists in Guava – clean duplicates and nulls from the list, reverse it and partition it – or convert it to an ImmutableList.
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.