Sanctions Screening is a simple rest endpoint that receives a GET request with a name to be matched against a pre-set Sanctions list. If the name provided matches by more than or equal to 75% of any item in the Sanctions list, the program returns a Hit. This service uses Spring Boot and JUnit for unit testing.
- Extract the zip file and load it in IntelliJ or your IDE of choice.
- JDK 11 or higher needed.
- Make sure you have Maven installed and in your path variable.
- Open IntelliJ command line and run:
mvn clean install.
java -jar target/sanctions-0.0.1-SNAPSHOT.jar
- On your browser, go to [http://localhost:8080/screen?input=KristopherDoe]
- Test cases can be written directly into the URL after
input=
, including spaces. - Additional information, such as Levenshtein Distance Score and percentage match, is printed directly to terminal.
-
On your IDE, open the file:
sanctions > src > test >java > com.screening.sanctions > ScreeningControllerTest.java
-
Run the test file to run all tests
Web server failed to start. Port 8080 was already in use.
- Go to sanctions > src > main > resources > application.properties
- Add a line to change your port number, like so:
server.port=9090
- Alternatively, clear any program currently using your port.