Skip to content

Instantly share code, notes, and snippets.

View straiforos's full-sized avatar
🎩

Stephen Traiforos straiforos

🎩
View GitHub Profile
@straiforos
straiforos / keycloak.yaml
Created January 1, 2024 00:41 — forked from fleeto/keycloak.yaml
Keycloak sidecar
---
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: null
name: httpbin-proxy
data:
proxy.json: |-
{
"target-url": "http://localhost:8000",
@straiforos
straiforos / EnumValidator.java
Created February 16, 2022 14:35 — forked from fuxingloh/EnumValidator.java
Java Enum, @ValidEnum with Constraint that supports JsonIgnoreProperties if not registered. Basically: how to handle unknown enum values in swift & java.
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
/**
* Created by: Fuxing
*/
public class EnumValidator implements ConstraintValidator<ValidEnum, Enum> {
@Override
public boolean isValid(Enum value, ConstraintValidatorContext context) {
if (value == null) return false;
@straiforos
straiforos / gist:77cdc80694adac803227d1cbbeff50a5
Created December 31, 2021 20:29 — forked from karmanov/gist:499e0dfdf8e5ce119ad4
spring.jpa.hibernate.ddl-auto values
validate: validate the schema, makes no changes to the database.
update: update the schema.
create: creates the schema, destroying previous data.
create-drop: drop the schema at the end of the session.