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 com.teletapper.actuator; | |
import com.teletapper.util.SecurityUtils; | |
import lombok.Data; | |
import lombok.Setter; | |
import lombok.extern.slf4j.Slf4j; | |
import lombok.val; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; | |
import org.springframework.boot.actuate.endpoint.jmx.annotation.JmxEndpoint; |
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 { AsyncContainerModule, Container as ContainerImpl, ContainerModule } from 'inversify'; | |
import { Provider as IocProvider } from 'inversify-react'; | |
import _ from 'lodash'; | |
import { PropsWithChildren, useEffect, useState } from 'react'; | |
const context = require.context('src', true, /\.config\.ts$|\.config\.tsx$|\.saga\.ts|\.events\.ts$/, 'lazy-once'); | |
const keys = context.keys(); | |
const getApplicationContext = _.once(async () => { | |
const container = new ContainerImpl({ defaultScope: 'Request' }); |
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 io.undertow.connector.ByteBufferPool; | |
import io.undertow.server.DefaultByteBufferPool; | |
import io.undertow.websockets.jsr.WebSocketDeploymentInfo; | |
import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; | |
import org.springframework.boot.web.server.WebServerFactoryCustomizer; | |
import org.springframework.context.annotation.Configuration; | |
@Configuration | |
class UndertowConfig implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> { |
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 org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.context.annotation.Profile; | |
import org.springframework.data.redis.core.RedisKeyValueAdapter; | |
import org.springframework.data.redis.repository.configuration.EnableRedisRepositories; | |
import org.springframework.session.data.redis.config.ConfigureRedisAction; | |
// https://dzone.com/articles/build-a-chat-application-using-spring-boot-websock | |
// https://engineering.salesforce.com/lessons-learned-using-spring-data-redis-f3121f89bff9 | |
// https://help.heroku.com/5BP0E8RC/how-to-enable-notify-keyspace-events-on-redis |
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 io.arleigh.gantry.cache.PrefixedKeyGenerator; | |
import io.arleigh.gantry.properties.AppRedisProperties; | |
import lombok.RequiredArgsConstructor; | |
import lombok.Setter; | |
import lombok.val; | |
import org.redisson.api.RedissonClient; | |
import org.redisson.jcache.configuration.RedissonConfiguration; | |
import org.redisson.spring.cache.RedissonSpringCacheManager; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; |
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 lombok.NonNull; | |
import lombok.SneakyThrows; | |
import org.apache.commons.codec.binary.Base32; | |
import org.springframework.lang.Nullable; | |
import java.nio.charset.StandardCharsets; | |
import java.security.MessageDigest; | |
import java.util.Arrays; | |
import java.util.Locale; | |
import java.util.regex.Pattern; |
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 org.springframework.lang.Nullable; | |
import java.nio.charset.StandardCharsets; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.time.Duration; | |
import java.time.LocalDateTime; | |
import java.util.Arrays; | |
import java.util.Random; | |
import java.util.UUID; |
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 io.arleigh.gantry.util.UuidGenerator; | |
import lombok.RequiredArgsConstructor; | |
import org.slf4j.MDC; | |
import org.springframework.context.annotation.Profile; | |
import org.springframework.lang.NonNull; | |
import org.springframework.stereotype.Component; | |
import org.springframework.web.filter.OncePerRequestFilter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.ServletException; |
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 io.arleigh.gantry.util.SecurityUtils; | |
import lombok.extern.slf4j.Slf4j; | |
import lombok.val; | |
import org.slf4j.MDC; | |
import org.springframework.boot.actuate.audit.listener.AuditApplicationEvent; | |
import org.springframework.context.event.EventListener; | |
import org.springframework.security.access.event.AbstractAuthorizationEvent; | |
import org.springframework.security.access.event.AuthorizationFailureEvent; | |
import org.springframework.stereotype.Component; | |
import org.springframework.util.ReflectionUtils; |
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
// noinspection RegExpSingleCharAlternation,RegExpUnnecessaryNonCapturingGroup | |
const isoEightSixZeroOne = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*))(?:Z|(\+|-)([\d|:]*))?$/; | |
export namespace jsonUtil { | |
export function isJsonPatch(obj: any): obj is unknown { | |
return false; | |
} | |
export function jsonReviver(key: string, value: any) { |