How to unmarshall a JSON that contains Unknown Properties using Jackson.
Search Results for: any
Apache HttpClient – Follow Redirects for POST
How to enable POST Redirect with Apache HttpClient.
Java 8 – Powerful Comparison with Lambdas
Elegant Sort in Java 8 – Lambda Expressions go right past syntactic sugar and bring powerful functional semantics into Java.
Jackson – JsonMappingException (No serializer found for class)
How to fix the Jackson 2 JsonMappingException (No serializer found for class).
Ignore Null Fields with Jackson
Ignore null fields with Jackson 2 – either globally, per class or even per field.
Apache HttpClient – Cancel Request
Stop/Abort long running requests with the Apache HttpClient.
Partition a List in Java
How to Partition a List using Guava or Apache Commons Collections.
A Guide to JPA with Spring
Setup JPA with Spring – how to set up the EntityManager factory and use the raw JPA APIs.
Creating a Web Application with Spring 5
How to Bootstrap a Web Application with Spring and Java-based Configuration.
Mockito When/Then Cookbook
Mockito configure Behavior –
examples, usage and best practices.
Mockito Verify Cookbook
Mockito Verify
examples, usage and best practices.
Hamcrest Collections Cookbook
Common Hamcrest matchers helpful when working with Collections and arrays.
Error Handling for REST with Spring
Exception Handling for a REST API – illustrate the new Spring recommended approach and earlier solutions.
Guava Collections Cookbook
Guava Collections Cookbook illustrating code examples and nothing else.
Properties with Spring and Spring Boot
Tutorial for how to work with properties files and property values in Spring.
Apache HttpClient with SSL
Example of how to configure the HttpClient with SSL.
RestTemplate with Digest Authentication
How to set up Digest Authentication for the Spring RestTemplate using HttpClient 4.
Spring Security Remember Me
Cookie Remember Me example with Spring Security.
Versioning a REST API
Versioning a REST API – version identifier in the URI or version media types?
Apache HttpClient Timeout
How to set up timeout for an HttpClient – connection and socket timeouts, and a mechanism for hard timeout of ongoing http connections.