How do I POST JSON data with Curl

To post JSON data with Curl, use the -X POST option and pass the JSON data using the -d command line parameter, with the Content-Type set to -H “Content-Type: application/json”.…

@Async Exception handling Spring Boot

The spring boot @Async annotation enables the class method to run asynchronous. The handling of the exception in the @Async annotation method is therefore complex. Spring boot supports the default…

RuntimeException: Driver claims to not accept jdbcUrl

Spring boot RuntimeException java.lang.RuntimeException: Driver claims to not accept jdbcUrl happens when an inappropriate data source url is configured to connect to a database. The database driver can accept the…

Print Hibernate SQL query string with parameter values in Spring Boot

In the spring boot application, if the hibernate log is enabled using the JPA spring boot configuration, the sql query will be printed. The value of the parameters is not logged in the hibernate log files. The default JPA spring boot configuration will enable sql queries to be logged as they are. Configuration will not enable the values of the parameter to log.If the sql query log is enabled using the hibernate logger directly, the hibernate class will log the query and query parameter values. The spring boot JPA will allow to…

How to enable Hibernate logs in Spring Boot

In Spring boot, hibernate logs should be enabled to debug the database connection and SQL query execution. By default hibernates logs are disabled in spring boot application. The hibernate logs…

Circular view path

The Circular view path error in spring boot occurs when the request mapping url and the model view url are the same in a rest controller method and no ViewResolver…

Spring Boot @Value Annotation

@Value spring boot annotation is used to inject values from the properties file into the java variables that have been configured. The @Value annotation in spring boot is used to…

Spring Boot @Autowired Annotation

In the spring boot, @Autowired annotation is used for dependency injection.In spring boot application, all loaded beans are eligible for auto wiring to another bean. The annotation @Autowired in spring…