项目作者: mkrolczyk12
项目描述 :
RESTful API webservice
高级语言: Java
项目地址: git://github.com/mkrolczyk12/restful-api-webservice.git
RESTful API webservice
RESTful API webservice responsible for managing and storing in database notes (without the UI part). (CRUD).
Table of contents
Technologies and dependencies
- Java - version 11
- Spring 5
- Spring boot - version 2.3.0.RELEASE
- Maven
- SQL - H2 (local profile)
- Hibernate - version 6.1.5.Final
- Flywaydb
- spring-boot-starter: data-jpa, web, starter-test
Requirements
Git, Java Development Kit 11 (JDK11)
Build instruction
There are two ways of interaction with project:
Use of a ready-made solution prepared by me
To use project, follow these steps:
- Open page: https://recruitmenttask.herokuapp.com/notes
- If the application has not been used for some time, there is a need to wait for the application to build (usually it takes about 20 seconds)
- Use the application by using ready endpoints available at the link: https://www.getpostman.com/collections/ac816262f12afdfbc33f
- Please download any extension that supports displaying JSON files in the browser, it is necessary because only then content from above link is readable (ex. extension: ‘JSONView’)
- (Optional) - If you want to make your own http request:
- Open terminal and clone the project from github repository:
$ git clone https://github.com/mkrolczyk12/recruitmentTask.git
- Write following commands into console:
$ .\mvnw clean
$ .\mvnw install
In result you should receive application .jar file.
- Open second terminal and type below commands:
$ cd [direct_path_to_the_previously_built_.jar_file]
$ java -jar [name_of_the_jar_file]
- After loading application is ready to use.
- Spring application uses port 8080 by default.
- Interact with application using link: http://localhost:8080/
- I recommend using Postman for making requests. I have also prepared a ready list of endpoints for localhost:
a) Available online: https://www.getpostman.com/collections/4495f497622ce37df451
b) To load in Postman: load file named ‘RecruitmentTaskLocalHost.postman_collection.json’ located in cloned project.
Database instruction
Application uses in-memory database in local profile.
There is no need to do anything, just follow the build instruction and the database should work.
If the app was built locally, there should be available a link to database admin panel: localhost:8080/h2-console
The panel allows to view the current database data. To log in type:
username: admin
password: admin
Status
completed
Created by @mkrolczyk12 - feel free to contact me!