- Run the
setup.sh
script to install mysql, create thespring
user,witchcraft
andwitchcraft_test
databases - Load
build.gradle
to import project in IntelliJ
- To build the React Frontend, run
./gradlew webpack
. If you want it to watch for changes, run./gradlew webpackWatch
- To run the server, run
./gradlew bootrun
. It should install dependencies, build the sources, generate the javascript for react and run the server. - The application is served at
localhost:8080
by default
- Run all tests:
./gradlew test
- Run only React tests:
./gradlew testReact
- Watch for React test changes:
./gradlew testReactWatch
In case you use java 9, you will probably have this warning message
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1
To fix it, add argument to JVM --illegal-access=deny
Lombok library is not working with Java 10, that's why lombok-edge.jar is used. Need to watch for lombok 1.16.21
Last version of MySql encrypts passwords by default, need to use this command line to create the user:
CREATE USER 'spring'@'localhost' IDENTIFIED WITH mysql_native_password BY '<PASSWORD>';