Registering a SQL function with JPA and Hibernate

Registering a SQL function with JPA and Hibernate

Lambda Expressions best Practices Example

Lambda Expressions best Practices Example

More updates on GitHub

Permutation of String in Java Algorithm

Covert String to byte array

We can use String class getBytes() method to encode the string into a sequence of bytes using the platform’s default charset. This method is overloaded and we can also pass Charset as argument.
Here is a simple program showing how to convert String to byte array in java.

Ignore case while find query using Mongodb.

Use This Criteria

How to add CORS with Spring?

1st Example For All Location

2nd Example For Validate which location and which method to allow

How To Register Multiple Interceptor In Spring MVC?

Create Configuration Class extends with WebMvcConfigurerAdapter

Log4j Multiple Appender Simple Example in java

# Root logger option
log4j.rootLogger=INFO, DEBUG, file,console

# Console Appender
log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-ddHH:mm:ss,SSS} %-5p [ %M ] ( %C ) %c{1}:%L - %m%n

# File Appender
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-ddHH:mm:ss,SSS} %-5p [ %M ] ( %C ) %c{1}:%L - %m%n

Provide time zone to Spring @Scheduled or XML?

Preferred Java way to ping an HTTP URL for availability