How to Use CommandLineRunner in Spring Boot Application

References https://www.quickprogrammingtips.com/spring-boot/how-to-use-commandlinerunner-in-spring-boot-application.html http://therealdanvega.com/blog/2017/04/07/spring-boot-command-line-runner

Continue reading »

@PathVariable in Spring Boot

References http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/mvc.html#mvc-ann-requestmapping-uri-templates-regex https://www.mkyong.com/spring-mvc/spring-rest-requestmapping-extract-incorrectly-if-value-contains/

Continue reading »

Configure Spring Session with Redis

build.gradle

application.properties

Continue reading »

Receive JSON data in Spring Boot MVC Controller

FormsApiController.java

FormBL.java

Continue reading »

No EntityManager with actual transaction available for current thread Exception on Spring

References https://stackoverflow.com/questions/10394857/how-to-use-transactional-with-spring-data

Continue reading »

JoinColumn vs mappedBy in JPA

References https://stackoverflow.com/questions/11938253/jpa-joincolumn-vs-mappedby https://stackoverflow.com/questions/37047938/jpa-hibernate-onetoone-joincolumn-referencedcolumnname-ignored

Continue reading »

How to Configure Spring Session with JDBC for MySQL

build.gradle

application.properties

HttpSessionConfig.java

then execute this script on MySQL

References http://docs.spring.io/spring-session/docs/current/reference/html5/#api-jdbcoperationssessionrepository-storage http://stackoverflow.com/questions/37398905/spring-session-with-jdbc-configuration-table-test-spring-session-doesnt-exis

Continue reading »
1 2