Simple example demonstrating a REST service for a simple data class . Please see Swagger Docu for more details. REST implementation is based on spring-boot-starter-data-jpa and spring-boot-starter-web. Service is secured with Spring Security , using default credentials (basic auth)
- user=user and
- password=password.
Navigate to http://localhost:8080/dogs in a browser to see the exposed dog microservice (after logging in).
When using Postman send GET request with Authorization type "basic auth", otherwise "401 Unauthorized" will be answered.
Unfortunately autowiring MockMvc does not work ...
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Data JPA
- Spring Web
- Rest Repositories
- Config Client Quick Start
- Eureka Discovery Client
The following guides illustrate how to use some features concretely: