A generic endpoint to storage of objects.
Include latest version to your project.
<dependency>
<groupId>io.github.thiagolvlsantos</groupId>
<artifactId>rest-storage</artifactId>
<version>${latestVersion}</version>
</dependency>
...
@EnableRestStorage
public class Application {
...main(String[] args) {...}
}
Example using YAMLs configuration file.
# OpenAPI params
springdoc:
api-docs:
path: /swagger
swagger-ui:
path: /swagger/ui
operationsSorter: alpha # Sorting endpoints alphabetically
tagsSorter: alpha # Sorting tags alphabetically
Extend AbstractRestHandler
to receive all events based on entity
type. You can, as example, implement a service for a given entity based on file-storage
or using jpa + hibernate
to save objects.
According to this setup, after server start, the OpenApi interface will be available at http://localhost:8080/swagger and Swagger UI at http://localhost:8080/swagger/ui.
Localy, from this root directory call Maven commands or bin/<script name>
at your will...