Skip to content

Instantly share code, notes, and snippets.

View gabriel-srodrigues's full-sized avatar

Gabriel Rodrigues gabriel-srodrigues

View GitHub Profile
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));
}
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;
@gabriel-srodrigues
gabriel-srodrigues / keycloak-compose
Created November 14, 2021 16:14
Um gist para a composição do keycloak
version: '3.8'
services:
postgres:
image: postgres
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password