This file contains 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.keruyun.kic.commons.enums; | |
import com.fasterxml.jackson.core.JsonParser; | |
import com.fasterxml.jackson.databind.*; | |
import com.fasterxml.jackson.databind.deser.ContextualDeserializer; | |
import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer; | |
import java.io.IOException; | |
public class CodeTextEnumDeserializer |
This file contains 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 simplejson as json | |
from sys import argv | |
from codecs import open | |
def read_all_nodes(file): | |
with open(file, 'r', 'utf-8') as f: | |
result = f.read() | |
root = json.loads(result) | |
return root["nodes"] |
This file contains 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
@Configuration | |
public class FeignConfig { | |
@Bean | |
public WebMvcRegistrations feignWebRegistrations() { | |
return new WebMvcRegistrationsAdapter() { | |
@Override | |
public RequestMappingHandlerMapping getRequestMappingHandlerMapping() { | |
return new FeignFilterRequestMappingHandlerMapping(); | |
} | |
}; |
This file contains 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.keruyun.ca.monitor.utils; | |
import org.hibernate.boot.model.naming.Identifier; | |
import org.hibernate.boot.model.naming.PhysicalNamingStrategy; | |
import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment; | |
public class CustomPhysicalNamingStrategy implements PhysicalNamingStrategy { | |
@Override | |
public Identifier toPhysicalCatalogName(final Identifier identifier, final JdbcEnvironment jdbcEnv) { |
This file contains 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.keruyun.ca.selection.site.cache; | |
import com.esotericsoftware.kryo.Kryo; | |
import com.esotericsoftware.kryo.io.Input; | |
import com.esotericsoftware.kryo.io.Output; | |
import com.esotericsoftware.kryo.pool.KryoPool; | |
import org.springframework.cache.Cache; | |
import redis.clients.jedis.Jedis; | |
import redis.clients.jedis.JedisPool; |
This file contains 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
class ApplicativeOps[M[_],A](ma:M[A])(implicit a:Applicative[M]){ | |
def ~>[B](mb: M[B]):M[B] = a(a(a.pure((_:A) => (b:B) => b), ma),mb) | |
def andKeep[B](mb: M[B]):M[B] = ~>(mb) | |
def <~[B](mb: M[B]):M[A] = a(a(a.pure((a:A) => (_:B) => a), ma),mb) | |
def keepAnd[B](mb: M[B]):M[A] = <~(mb) | |
def <~>[B,C](mb: M[B])(implicit witness: <:<[A,B => C]): M[C] = apply(mb) | |
def apply[B,C](mb: M[B])(implicit witness: <:<[A,B => C]): M[C] = a(a.map(ma,witness),mb) |