-
Notifications
You must be signed in to change notification settings - Fork 2
Create Account Create Service
Create spring boot account-create-service project as microservice.
Add below dependencies in your project.
compile('org.springframework.boot:spring-boot-starter-data-jpa')
for JPA data store
runtime('mysql:mysql-connector-java')
for mysql connection
Set below property on application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/accountservicedb?createDatabaseIfNotExist=true
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update
Run spring boot account-create-service. It will be running on 8080 port.
To register user use below information:
URL: http://localhost:8080/registration/user/createAccount
Method: POST
Content-Type: application/json
Body:
{ "firstName":"Piyush", "lastName":"Chaudhari", "email":"[email protected]", "password":"XXX", "age":25 }