To develop an online appointment making system for vet clinics which consists of end user mobile applications and an admin portal for clinics. This is the repository for backend providing APIs
- controller - provide apis
- dao - provide functions to interact with db (CRUD)
- pojo - entity classes
- service - function logic
- scripts - sql scripts for table creation and data intialization
- application.properties - project config
- pom.xml - maven package config
- Java
- SpringBoot
Jpa (Java Persistence API)
- Azure Linux VM
- Apache-tomcat-9
- Docker
- Mysql
- Intellij IDEA 2020.3
- Maven - package management tool
- Swagger - api documentation http://localhost:8080/swagger-ui.html#/
- Please go follow link to download Intellij IDEA 2020.3
- This version of IntelliJ has already contain Tomcat, Spring, Maven plugins
- Please download Java JDK 15 and install it
Please follow this tutorial
https://docs.google.com/document/d/1I5FBhkh0cMp_Y8Kzfcjd3w0s0cVusiLwKWlvDnPdQ-Q/edit?usp=sharing
https://www.cnblogs.com/ityouknow/p/5891443.html
On intellij go to File -> Project Structure -> Modules -> Dependencies Press the "+" button below select import JAR and select the jar file under externallib
-
Go to foler src/main/resources/application.properties file and modify spring.mail.username and spring.mail.password
- For username please exclude the @gmail.com
-
Unblock unsecure app to send email through gmail Follow this link to unblock: https://devanswers.co/allow-less-secure-apps-access-gmail-account/
- open the comment for docker in application.properties
- run mvn package
- run following command to create mysql container '''docker run --name mysqldb -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=mydb -e MYSQL_USER=sa -e MYSQL_PASSWORD=password -d mysql:8'''
- login db and create tables
- run following command to build application image '''docker build -t springbootapp .'''
- run foolowing command to run application container and link to the db container '''docker run -d -p 8089:8089 --name springbootapp --link mysqldb:mysql springbootapp'''
- ssh to vm '''ssh vmadmin@20.188.120.77''' password:Ask Yifei
- access db inside docker container '''sudo docker exec -it 2d4409a34db2 /bin/sh'''
- run application container and link to db'''sudo docker container run -d -p 80:8089 --name springbootapp5 --link 2d4409a34db2 a11a8dc0f83b'''
- view all docker container ''''sudo docker container ls -a'''
- start container '''sudo docker container start 2d4409a34db2'''
- Weng Yifei (U1920094F)
- Liang Xuchao (U1920092B)
- Ma Xin (U1920122B)
- Lin Yan (U1920925F)
- Zhan Yijia (U1920682H)
- Xu Zhiyong (U1920735K)