Skip to content

Latest commit

 

History

History
43 lines (34 loc) · 4.06 KB

README.md

File metadata and controls

43 lines (34 loc) · 4.06 KB

Build Status Quality Gate Issues

Overall Coverage UT Coverage Function Complexity Class Complexity Duplications Code Smells

This is the repo for the exercise project to be developed in Shanghai team's Modern Web Development course

Installation

Please install the following tools for this project. The latest version should be fine unless specific version is listed.

  • git
  • jdk 1.8
  • mysql
  • Intellij (please choose either community or ultimate edition)
    • Intellij idea community edition with the following plug-in installed
      • lombok plug-in
      • cucumber java plug-in
    • Intellij idea ultimate edition (evaluation) with the following plug-in installed
      • lombok plug-in
  • Chrome

Setup Command Line Development Environment

Use git to clone this project into a folder. Then in this folder, run the command below in order.

  • Create a default mysql dba user mysql -u root -p < src/main/sql/create_default_dba.sql
  • Init Intellij environment ./gradlew idea
  • Start Web Application ./gradlew run (on port 8090)
  • Run All Tests ./gradlew ci (on port 8080)
  • if you want to start it on a port rather than 8090 (e.g. 8070), please do ./gradlew run -Pport=8070

Setup Intellij Development Environment

  • Start Web Application
    • Intellij idea community edition
      • Run com.odde.bbuddy.Application as a Java application by setting environment variable "SPRING_PROFILES_ACTIVE" to "dev"
    • Intellij idea ultimate edition
      • Run com.odde.bbuddy.Application as a Spring Boot application by setting environment variable "SPRING_PROFILES_ACTIVE" to "dev"
  • Run Unit Tests. Run those unit tests as normal. The only limitation is that you can't run those "Nested" tests together with other non "Nested" tests
  • Run Acceptance Tests (cucumber). In feature file, you can select the feature or one scenario and then run it. In the configuration, you need to set environment variable "SPRING_PROFILES_ACTIVE" to "test"
  • Spring Boot Developer Tools is used so that you can hot load any modified code, template file and resource file without restart the application. Please follow the steps below to enable this hot load feature.
    • Start the application in Intellij as described in the first item. Don't start it with gradle in command line.
    • Edit any code or file, and make the project. Then, the change will be reloaded automatically.
    • You can install a Chrome extension called Live Reload so that the tab (in which this application is opened) will be refreshed automatically.