Author: Deevisha Verma

Querying Array of String using JPA Specification

Reading Time: 2 minutes Writing dynamic queries using JPA Specification could be a hard to understand and implement but lets make it simple and easy to understand! To query array of string in postgreSQL , we might use a query like this : select * from employee where ARRAY_TO_STRING(keywords, ‘,’) LIKE ‘%lunch%’; To use specification for querying array string datatype ,we will have to Define a custom dialect to Continue Reading

How to set default column value in JPA

Reading Time: < 1 minute There might be a situation when you want to set the default value of column in spring boot. You might be thinking how to set it even when you have set the default value in the database but you still get a null value stored in the database . It is because JPA includes the columns with null value in the insert query which you Continue Reading

Spring Beans in Java

Reading Time: 2 minutes Spring IoC container is the core of the Spring Framework.In spring-based applications, objects live inside a spring containerThe container instantiate the objects, wires them together and manages their complete life cycle from creation till destruction.These objects in the Spring IoC container are referred to as beans. What is Inversion Of Control(IoC)? IoC simply means giving control to spring container to create and instantiate the spring beans Let`s say you want to Continue Reading