Post hidden from Hashnode
Posts can be hidden from Hashnode network for various reasons. Contact the moderators for more details.
Spring Boot Microservices, Docker and Configuration
- Developing Microservices:
- Spring Boot
- Spring Data JPA
- MySQL
- Build, Deploy and Scale Microservices using Docker
- Configurations in Microservices : Spring Cloud Config
Step 1 - Create the database
- download and run the docker image - MySQL
docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password mysql
run the database script
create database if not exists microservice_demo; use microservice_demo; DROP TABLE IF EXISTS students; DROP TABLE IF EXISTS addresses; CREATE TABLE `students` ( `student_id` int AUTO_INCREMENT PRIMARY KEY, `first_name` varchar(50) NOT NULL, `last_name` varchar(50) NOT NULL, `email` varchar(100) NOT NULL ); CREATE TABLE `addresses` ( `student_id` int NOT NULL, `address_id` int AUTO_INCREMENT PRIMARY KEY, `city` varchar(50) NOT NULL, `state` varchar(50) NOT NULL, `country` varchar(50) NOT NULL ); insert into students (student_id, first_name, last_name, email) values (1, 'John' , 'Doe' , 'john@outlook.com'); insert into addresses (student_id, address_id, city, state, country) value (1, 12345 , 'Orlando' , 'FL' , 'USA');