This provide a RESTful API to find a legal aid adviser . This is one hour work (took little more) and not production ready
- It is a public API for demo only
- No authorisation and authentication
- This should be completed in an hour
- Paging not added
- No caching at the API(RESTFUl) level. Although the data is cached at the java end
- Minimal validation
- No API documentation is used (like swaggar)
The App has been compiled by a more recent version of the Java Runtime (class file version 55.0). JDK 12 is used for the project
- The built is with Gradle . The version used is 4.10.2
- It can be built from Java
- The IntelliJ is used as IDE
C:. ├───main │ ├───java │ │ └───uk │ │ └───gov │ │ └───justice │ │ └───digital │ │ └───legaladviser │ │ ├───domain │ │ ├───exception │ │ ├───persistence │ │ ├───resources │ │ └───service │ └───resources └───test └───java └───uk └───gov └───justice └───digital └───legaladviser └───test
A gradle task is configure in build.gradle
To build using gradle
gradlew bootJar
The legal-providers.csv is added as a resource. So you can run either through gradle or throug java
gradlew bootRun
Alternatively this can be run
java -jar moj-excercise-legal-providers.jar
The ability to pass files as argument will not give any error. But this is not completely implemented as on now due to time restrictions. So the csv file name is loaded as a resource
gradlew bootRun --args='--db=legal-providers.csv'
Alternatively this can be run
java -jar moj-excercise-legal-providers.jar --db=legal-providers.csv
- Gradle buildscan is configured to report any build or run issues
The following are possible
crime,debt,housing,immigrationorasylum,welfarebenefits