This is a mini file service application.
Project Requirements are defined here 'minifileservice/docs/Mini File Service Design.doc'.
First you need to install postgresql for database.
You should set the username as 'postgres' and password as '12345'. If not, you should update the datasource username and password according to your postgresql. You can do it from src/main/resources/application.properties.
After the install, create a database named 'mini_file_service_db'
Then you can clone the project.
After the clone, git bash to the project folder and write the following
- mvn clean install- cd target
- java -jar minifileservice-0.0.1-SNAPSHOT.jar
That's it. Now you can click this link to open Swagger UI and test the project or you can test the project on Postman.
During the initialition of the project two user are created. These are 'admin' and 'user'. Here is the details of the users:
- username: admin - username: user- password: admin - password: user
- user role: ADMIN_USER - user role: REGULAR_USER
Open [this link](http://localhost:8080/swagger-ui/) to test the project on Swagger UI.
- First send a login request and copy the token in the response.
- username : admin and password: admin
- username : user and password: user
- Then click to the Authorize button and type 'Bearer ' then paste the token here (Bearer + space + token). When you click to the Authorize button swagger ui will be authorized and all other request will be runnuble.
Now you can test all the methods.
Get exported collection files from 'minifileservice/docs/postman collections' and import them in the postman. After the import please select LocalHost environment. Then you can start to test application.
- First run the 'Authenticate' request with the username and password. This request sets 'token' environment. After this request all other request will be runnuble.
Now you can test all the methods. Some requests have path variable. You may need to update this path variables.