Please go through my all projects here https://github.com/kshivakumar27
- Java 16
- Maven
- MySQL
- Your preferred IDE (Eclipse/ Spring Tool Suite/ IntelliJ)
BookMyDoctor is a Spring Boot application built using Maven. You can build a jar file and run it from the command line:
git clone https://github.com/kshivakumar27/BookMyDoctorSpringBootMVC.git
cd BookMyDoctor
./mvnw package
java -jar target/*.jar
You can then access BookMyDoctor here: http://localhost:8081/
Or you can run it from Maven directly using the Spring Boot Maven plugin. If you do this it will pick up changes that you make in the project immediately (changes to Java source files require a compile as well - most people use an IDE for this):
./mvnw spring-boot:run
NOTE: Windows users should set
git config core.autocrlf true
to avoid format assertions failing the build (use--global
to set that flag globally).
In its default configuration, BookMyDoctor uses a MySQL database which doesn't get populated automatically with data. To populte the database, import data from BookMyDoctordump folder
You could start MySql locally with whatever installer works for your OS, or with docker:
-
On the command line
git clone https://github.com/kshivakumar27/BookMyDoctorSpringBootMVC.git
-
Inside Eclipse or STS
File -> Import -> Maven -> Existing Maven project
Then either build on the command line
./mvnw generate-resources
or using the Eclipse launcher (right click on project andRun As -> Maven install
) to generate the css. Run the application main method by right clicking on it and choosingRun As -> Java Application
. -
Inside IntelliJ IDEA In the main menu, choose
File -> Open
and select the BookMyDoctor pom.xml. Click on theOpen
button.CSS files are generated from the Maven build. You can either build them on the command line
./mvnw generate-resources
or right click on theBookMyDoctor
project thenMaven -> Generates sources and Update Folders
.A run configuration named
BookMyDoctorApplication
should have been created for you if you're using a recent Ultimate version. Otherwise, run the application by right clicking on theBookMyDoctorApplication
main class and choosingRun 'BookMyDoctorApplication'
. -
Navigate to BookMyDoctor
Visit http://localhost:8081 in your browser.