This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Objects; | |
| public enum StateType { | |
| CREATED { | |
| @Override | |
| public StateType next(StateType nextState) { | |
| if (Objects.isNull(nextState) || this.equals(nextState)) { | |
| throw new RuntimeException("state %s not allowed for actual state: %s".formatted(nextState, this)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package br.com.digitalhouse.dentistas; | |
| import br.com.digitalhouse.dentistas.dto.DentistaListResponse; | |
| import com.fasterxml.jackson.core.JsonProcessingException; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import com.mashape.unirest.http.HttpResponse; | |
| import com.mashape.unirest.http.Unirest; | |
| import com.mashape.unirest.http.exceptions.UnirestException; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.boot.SpringApplication; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.8' | |
| services: | |
| postgres: | |
| image: postgres | |
| environment: | |
| POSTGRES_DB: keycloak | |
| POSTGRES_USER: keycloak | |
| POSTGRES_PASSWORD: password |