Speeding Up Gradle Executions with Parallelisation (2 mins read).
How to make your Gradle builds faster, by taking advantage of parallelisation.
Testing Time with Java (4 mins read).
How to make your Java tests better when dealing with
How to add a
javax.servlet.Filter to a Jersey application, built using the AWS Serverless Container for Java.
Writing Environment-Agnostic Functional Acceptance Tests (7 mins read).
How to structure your (Java) functional acceptance tests to make it easier to add environment-specific configuration.
Introducing two new Java libraries for performing server-driven content negotiation.
MediaTypes with Spring (1 mins read).
How to compare Spring's
MediaType by ignoring charset or parameters.
Recommended read: A crash happened outside the java virtual machine – Inside.java https://inside.java/2020/12/03/crash-outside-the-jvm/
How to List Gradle's Buildscript / Plugin Dependencies (1 mins read).
How to list the dependencies that are used by Gradle's plugins as part of its buildscript.
How to use Gradle to publish and consume artefacts build on your local machine.
Recommended read: Practical Contract Testing with Spring Cloud Contract by Oleksandr Romanov - YouTube https://youtube.com/watch?v=_AYfxXJ7o20
How to use the maven-toolchains-plugin to configure multiple JDKs on your machine.
How to generate POJOs really quickly and easily, with no manual work, using the Mojohaus jaxb2-maven-plugin.
Globally Disable TLS Checks with Java for
HttpsURLConnection (1 mins read).
How to disable TLS checks when using
HttpsURLConnections in Java.
Recommended read: Life Beyond Java 8, by Trisha Gee / JetBrains Technology Day for Java (2020) https://youtu.be/gKestt55Q4M
Recommended read: Bootiful Testing, by Josh Long / JetBrains Technology Day for Java (2020) https://youtu.be/RrgL7_AW6S4
How to Manually Trigger JSR380 Bean Validation on a Class (2 mins read).
How to perform validation on a class using JSR380, when not using a framework like Spring Boot.
How to set Gradle configuration globally to add a task to list all your dependencies.
How to use Gradle's initialization scripts to globally configure tasks across all of your projects.
How to avoid the error
'junit-vintage' failed to discover tests when using Spring Boot.
Recommended read: Spring Boot Hello World Example - Thymeleaf - Mkyong.com https://mkyong.com/spring-boot/spring-boot-hello-world-example-thymeleaf/
@Mock as a Method Parameter with Mockito (2 mins read).
@Mock on method parameters to reduce manual mock setups with Mockito.
Creating an iCalendar feed for certificate expiry details, given a URI for a JSON Web Key Set.
How to Run Java on the Command-Line to Attach a Debugger (1 mins read).
How to run
java on the command-line, and make it possible to attach a debugger.
Extract a Public Cert from a Java Keystore/Truststore (1 mins read).
How to export the public certificate from a Java keystore.
Evicting Spring Cache on a Schedule (1 mins read).
How to evict Spring Cache's
@Cacheable data on a schedule.
How to avoid receiving
Required request body is missing errors when using a
Reading a Servlet/Spring Request Body Multiple Times (2 mins read).
How to read the request body more than once using Java Servlet Filters.
@Valid Annotation in a Spring Integration Test (1 mins read).
How to disable
@Valid validation in Spring Integration Tests.
#Java friends testing using #RestAssured, you may enjoy my article https://www.jvt.me/posts/2020/05/18/rest-assured-curl/ which can help you convert its logs to
curl requests, for cases you need to do some manual testing, too
Running Spotless Automagically with Gradle (2 mins read).
How to set Gradle configuration globally to always run
spotlessApply in your projects.
Recommended read: AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
Recommended read: How to resolve "Can't start redis server. Check logs for details" with embedded-redis https://github.com/kstyrc/embedded-redis/issues/51#issuecomment-549726148
Tomcat May Log Cookies Out-of-the-Box (3 mins read).
Warning you about cookies being logged out-of-the-box, and how to resolve it.
Providing Custom Serialization for
Map Keys in Jackson (1 mins read).
How to configure Jackson to use a custom method to serialise keys for a
Recommended read: Comparison table of Java's `HttpServletFilter`'s methods https://stackoverflow.com/questions/4931323/whats-the-difference-between-getrequesturi-and-getpathinfo-methods-in-httpservl/21046620#21046620
Extract a Private Key from a Java Keystore (1 mins read).
How to export an asymmetric
PrivateKeyEntry entry from a Java keystore.
Recommended read: That upgrade from Java 8 to 11 you've been putting off? UK fintech types at Revolut 'quite happy' after a year in production https://www.theregister.co.uk/2020/03/17/that_upgrade_from_java_8_to_11_revolut_quite_happy_after_a_year_in_production/