- Spring Data Query to DTO
We will show here how you can map a DTO to a query using constructor. First create your entity class. Here we will have a User class. Second create your DTO class. In this case we will have a UserDto. As you can see that all fields and values must be loaded into the UserDto […]
- Spring Data Native Query to DTO
Let’s show how you can map a native SQL query to a DTO directly. Using AliasToBeanResultTransformer All the fields in the DTO, in this case UserFullDto, must have the same names as the result set returned from the query. If a query field name is not found in the dto then it will through an […]
- Spring Data Custom Select Query with Join
In this tutorial, I am going to show you how to use JOIN in custom spring JPA queries. The join is always on the id column. Multiple Joins
- MySQL Connection
The SHOW FULL PROCESSLIST statement shows all threads that are currently running. It is very handy to use if you get the “too many connections” error message and want to find out what is going on. Sometimes some connections are hanging and taking up resources that other threads might need. When you…
- AWS Lambda to stop an rds instance