Java – Bean validation 2.0 (JSR-380) with Spring boot

http://www.baeldung.com/javax-validation

http://andreinc.net/2017/10/02/writing-an-unified-validation-mechanism-for-rest-apis-using-spring-boot-and-jsr-380/

https://github.com/nomemory/java-bean-validation-extension

Advertisements
Posted in Java, Programming | Leave a comment

Java – ForkJoinPool

Good explanation on ForkJoinPool in Java

http://www.baeldung.com/java-fork-join

Posted in Java, Programming | Leave a comment

Java – logging components and explanation

LOGGERS: loggers are responsible for capturing events and passing them to the appropriate appender.

APPENDERS: also known as handlers, appenders are responsible for recording log events to a destination. appenders use layouts to format events before sending them to an output.

LAYOUTS: also known as formatters, layouts are responsible for converting and formatting the data in a log event. layouts determine how the data looks when it appears in a log entry.

Posted in Java, Programming | Leave a comment

Java – REST API with Spring Security

Securing REST API with Spring Security.

http://www.baeldung.com/securing-a-restful-web-service-with-spring-security

Posted in Java, Programming | Leave a comment

Java – Recording Java Flight Recording in Java 9

Command line to enable Java Flight Recording feature in Java9 for measure JVM performance.

$ java -XX:+UnlockCommercialFeatures -XX:StartFlightRecording=filename=recording.jfr AppName
Posted in Java, Programming | Leave a comment

Java – JDK9 tool jdeps and jdeprscan to inspect any illegal usage

The following jdeps command will inspect any illegal usage in My.class and provide alternative way to fix problems.
This tool exists in JDK9.

$ jdeps -jdkinternals My.class

Static analysis tool detect the usage of deprecated APIs.

$ jdeprscan -cp My
Posted in Java, Programming | Leave a comment

Java – Guidance of using wildcard in generic

The basic guidance of using wildcard in Java generic

https://docs.oracle.com/javase/tutorial/java/generics/wildcardGuidelines.html

Posted in Java, Programming | Leave a comment