citerus/dddsample-core

repository·master·Indexed 26 days ago

https://github.com/citerus/dddsample-core

A Spring Boot application serving as a reference implementation to demonstrate Domain-Driven Design (DDD) principles. Includes a HandlingReport REST API and uses an in-process HSQL database.

Tokens
394
Snippets
3
Records
3
Agent score
40%

What's inside dddsample-core

  1. Run the DDDSample application

    master

    The application uses Spring Boot and an in-process HSQL database. To start the application, run the following command from the root directory:

    ./mvnw spring-boot:run

    Once started, access the application at http://localhost:8080/dddsample. Ensure that no firewall is blocking communication and that JavaScript is enabled for localhost.

    Note for Windows users: Use mvnw.cmd instead of ./mvnw.

    ./mvnw spring-boot:run
  2. Build the DDDSample project

    master

    Use the included Maven wrapper to build the project. You can compile the code, run tests, or generate the documentation site.

    • To compile and run all tests: ./mvnw verify
    • To compile without running tests: ./mvnw compile
    • To generate the documentation site: ./mvnw site:run (accessible at http://localhost:8080)

    Note for Windows users: Use mvnw.cmd instead of ./mvnw.

    ./mvnw verify
  3. Use the HandlingReport REST API

    master

    The HandlingReport API provides a single endpoint that accepts a JSON request body via a POST request.

    Endpoint: POST /dddsample/handlingReport

    You can test this endpoint using cURL by pointing to a JSON file. For a sample request, you can use the file located at src/test/resources/sampleHandlingReport.json.

    curl --data-binary "@/path/to/project/src/test/resources/sampleHandlingReport.json" \
    -H 'Content-Type: application/json;charset=UTF-8' \
    http://localhost:8080/dddsample/handlingReport