This is a Spring example project using:
- Spring Boot
- Spring Data (ORM against MySQL)
- Spring MVC (Model View Controller Service Repository stack)
- Thymeleaf Template Engine
- BootStrap
NO XMLs, full annotation-driven.
This project was made with the purpose to be ran just out of the box. This feature requires a little bit of work:
- MySQL5.6 server (and the right permissions to CRUD)
- Gradle 2.0 and the proper pointing to it in your PATH
Once you have this software properly installed and configured, do the next:
- Create an empty database
- Configure the database connection parameters in application.properties as follows:
spring.datasource.url=jdbc:mysql://localhost:3306/yourAwesomeDatabaseName spring.datasource.username=yourDatabaseUsername spring.datasource.password=yourDatabasePassword
There is another parameter (driverClassName) that should not be changed if you're using MySQL
Once you have this requirements accomplished just run:
```gradle bootRun```
If everything went fine, the server trace has to show no errors and the finishing message:
```Started Application in xx.xxx seconds (JVM running for zz.zzz)```
Use it
======
Take a look to the classes available at com.sukaro.example.web package to have an idea of the URL mappings of this application.
Resuming:
<ul>
<li>localhost:8080/customers</li>
<li>localhost:8080/newcustomer</li>
<li>localhost:8080/cars</li>
<li>localhost:8080/newcar</li>
</ul>