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
/* | |
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. | |
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. | |
* | |
* | |
* | |
* | |
* | |
* | |
* |
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
@Id | |
@GeneratedValue(strategy= GenerationType.TABLE, generator = "string_prefix_generator") | |
@GenericGenerator(name = "string_prefix_generator", strategy = "com.circlee7.test.util.StringPrefixTableGenerator", parameters = { | |
@Parameter(name = "table_name", value = "new_key_numbers"), | |
@Parameter(name = "value_column_name", value = "key_number"), | |
@Parameter(name = "segment_column_name", value = "name"), | |
@Parameter(name = "segment_value", value = "names_key"), | |
@Parameter(name = "prefix_key", value = "prg")}) | |
private String id; |
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 org.hibernate.MappingException; | |
import org.hibernate.engine.spi.SharedSessionContractImplementor; | |
import org.hibernate.id.enhanced.TableGenerator; | |
import org.hibernate.internal.util.config.ConfigurationHelper; | |
import org.hibernate.service.ServiceRegistry; | |
import org.hibernate.type.StandardBasicTypes; | |
import org.hibernate.type.Type; | |
import java.io.Serializable; | |
import java.util.Properties; |
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
@Bean | |
WebSocketHandlerAdapter getWebsocketHandlerAdapter(){ | |
HandshakeWebSocketService handshakeWebSocketService = new HandshakeWebSocketService(); | |
handshakeWebSocketService.setSessionAttributePredicate( k -> true); | |
WebSocketHandlerAdapter wsha = new WebSocketHandlerAdapter(handshakeWebSocketService){ | |
@Override | |
public Mono<HandlerResult> handle(ServerWebExchange exchange, Object handler) { |
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 java.time.LocalDateTime; | |
import java.time.format.DateTimeFormatter; | |
import java.util.*; | |
import java.util.stream.Collectors; | |
public class LocalDateTimeRange<T> { | |
enum EDGE { | |
START, END |
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 java.time.LocalDateTime; | |
import java.time.format.DateTimeFormatter; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.function.Function; | |
import java.util.function.Predicate; | |
import java.util.stream.Collectors; |
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 java.time.LocalDateTime; | |
import java.time.format.DateTimeFormatter; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.function.Function; | |
import java.util.function.Predicate; | |
import java.util.stream.Collectors; |
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
@RestController | |
public class ApiController { | |
Logger logger = LoggerFactory.getLogger(ApiController.class); | |
@Autowired(required = false) | |
CentralConfig centralConfig; | |
@Autowired(required = false) | |
ContextRefresher contextRefresher; |
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
public synchronized Set<String> refreshEnvironment() { | |
Map<String, Object> before = extract( | |
this.context.getEnvironment().getPropertySources()); | |
addConfigFilesToEnvironment(); | |
Set<String> keys = changes(before, | |
extract(this.context.getEnvironment().getPropertySources())).keySet(); | |
this.context.publishEvent(new EnvironmentChangeEvent(this.context, keys)); | |
return keys; | |
} |
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
/* | |
* Copyright 2012-2019 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |