A REST HTTP service for an e-commerce website.
cd src/main/resources- Modify
mysql_creds.cnfwith mysql username and password sh create_schema.sh
- Program Arguments:
server src/main/resources/config.yaml
- Open project module settings
Dependenciestab- Select '+' -> JARs or Directories..
- Select the directory containing the 'assets' folder which has the static files.
- Select
Classeswhen prompted to choose the category.
Now static files under the assets folder will be served in the path /assets/image.jpg
mvn clean installjava -jar path/to/jar.jar server path/to/config.yaml
To server static content, have a directory named static in the same directory as the jar and put all the static contents under the assets folder inside the static directory.
The directory should be named 'static' and should be in the same path as the jar file because the maven shade plugin is configured to add this static folder to the class path