Milfist / Spring-Boot-Example

API-REST example (Spring Boot 1.5, MyBatis and MySQL)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpringBootExample

The project is simple. Be careful with the persistence layer to extend the project.

I will go completing...

MySQL config:

If you have a local or remote version of MySQL already configured, you will only have to change the 
application.yml and adapt it to your connection.

We're going to use a Docker container.

Get the image: docker pull mysql

Create a container and start it:

docker run -i -t -p 3306:3306 --name {NAME} -e MYSQL_ROOT_PASSWORD={PASSWORD} -d {IMAGE:VERSION}

{NAME}: Container name.
{PASSWORD}: Password to root user.
{IMAGE:VERSION}: Name of our image and its version.

Example:

docker run -i -t -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=pass -d mysql:5.5

Enter the container:

docker exec -i -t {CONTAINER-NAME} {COMMAND} -u {USER} -p

{CONTAINER-NAME}: :)
{COMMAND}: Command to execute.
{USER}: User, necessary to open MySQL console.

Example:

docker exec -i -t mysql5 mysql -u root -p

Enter the key you defined in the creation of the container.

By:

alt text

About

API-REST example (Spring Boot 1.5, MyBatis and MySQL)

License:GNU General Public License v3.0


Languages

Language:Java 100.0%