summaryrefslogtreecommitdiff
path: root/microservices/03-resource-server/README
blob: 095e8c5fe360adbd72ebad92161827289f340515 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
This project exposes REST endpoints (accessed by API gateway) and the endpoints are secured by OAuth2.

Some pom.xml dependencies:
  To make this Spring Boot project an OAuth2 resource server (Allow access from OAuth2 clients):
    <dependency>
  	<groupId>org.springframework.boot</groupId>
  	<artifactId>spring-boot-starter-security-oauth2-resource-server</artifactId>
    </dependency>

  To use H2 in-memory database (as configured in main/src/resources/application.yaml file):
    <dependency>
  	<groupId>com.h2database</groupId>
  	<artifactId>h2</artifactId>
  	<scope>runtime</scope>
    </dependency>

  To use H2 database console accessible via a web browser:
    <dependency>
  	<groupId>org.springframework.boot</groupId>
  	<artifactId>spring-boot-h2console</artifactId>
    </dependency>

How to access the H2 database console:
  URL: http://localhost:8052/myservices/h2-console
  Details (as configured in application.yaml file):
    Database name: jdbc:h2:mem:testdb
    Username: sa
    Password: password