Spring Boot with all examples

If you want to Spring Boot that has REST, JSP, Filter, DB template with JDBI, DB Transaction control, auto update changes.

This page is for you.

Full Code with Spring Boot 1.5.8.RELEASE:

0_spring-boot-jdbi-all.zip

What you need for run this:

  • Maven 3
  • Java 8
  • MySQL 5.x

What the example will support (Click to see more detail):

Coming Soon:

  • Support Unit Test with Spring Boot
  • Support Integration Test with Spring Boot
  • More example about DB transaction with Spring Boot

Important thing you must know:

Note that if you deploy as war, these 2 properties in the application. properties will be useless:

So, the context path and port will depend on your Tomcat configuration.

How to run it:

create a database named “testdb” and run dbscript.sql to the table in MySql:

change application.properties to your MySql username and password:

run this in console:

Then run this to start:

You should see something like this:

Open a browswer and try to go to this url:

Note that the the context path is “/test”.

You should see this:

This is what you can do:

See the link above to see the detail which configurations do that for you.