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.elasticsearch.common.network.NetworkModule; | |
import org.elasticsearch.common.settings.Settings; | |
import org.elasticsearch.plugins.Plugin; | |
import org.elasticsearch.test.ESIntegTestCase; | |
import org.elasticsearch.test.NodeConfigurationSource; | |
import org.elasticsearch.transport.Netty4Plugin; | |
import org.elasticsearch.transport.nio.NioTransportPlugin; | |
import org.junit.Before; | |
import java.nio.file.Path; |
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
./gradlew wrapper --gradle-version=3.0-rc-2 |
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
@SpringBootApplication | |
public class Application { | |
public static void main(String[] args) { | |
SpringApplication.run(lookup().lookupClass(), args); | |
} | |
} |
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
npm version patch -m "Version %s - description" | |
git push && git push --tags | |
git push origin master --tags | |
npm publish |
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
def installer = install.repositories.mavenInstaller | |
def deployer = uploadArchives.repositories.mavenDeployer | |
[installer, deployer]*.pom*.whenConfigured {pom -> | |
def dependencyMap = project.configurations.compile.dependencies.collectEntries { [it.name, it] } | |
pom.dependencies.findAll { | |
def dep = dependencyMap[it.artifactId] | |
return dep?.hasProperty('optional') && dep.optional | |
}*.optional = true | |
} |
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 class MessageHandlerHealthIndicator extends AbstractHealthIndicator { | |
private final AbstractBrokerMessageHandler abstractBrokerMessageHandler; | |
public MessageHandlerHealthIndicator(AbstractBrokerMessageHandler messageHandler) { | |
Assert.notNull(messageHandler, "MessageHandler can not be null"); | |
this.abstractBrokerMessageHandler = messageHandler; | |
} | |
@Override |
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 class AcceptGzipEncodingFeignRequestInterceptor implements RequestInterceptor { | |
private static final String ACCEPT_ENCODING_HEADER = "Accept-Encoding"; | |
private static final String GZIP_ENCODING = "gzip"; | |
private static final String DEFLATE_ENCODING = "deflate"; | |
@Override | |
public void apply(RequestTemplate template) { |
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 class EurekaHealthCheckHandler implements HealthCheckHandler, ApplicationContextAware, InitializingBean { | |
private static final Map<Status, InstanceInfo.InstanceStatus> healthStatuses = new HashMap<Status, InstanceInfo.InstanceStatus>() {{ | |
put(Status.UNKNOWN, InstanceInfo.InstanceStatus.UNKNOWN); | |
put(Status.OUT_OF_SERVICE, InstanceInfo.InstanceStatus.OUT_OF_SERVICE); | |
put(Status.DOWN, InstanceInfo.InstanceStatus.DOWN); | |
put(Status.UP, InstanceInfo.InstanceStatus.UP); | |
}}; | |
private final CompositeHealthIndicator healthIndicator; |
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 | |
UndertowEmbeddedServletContainerFactory embeddedServletContainerFactory() { | |
UndertowEmbeddedServletContainerFactory factory = new UndertowEmbeddedServletContainerFactory(); | |
factory.addBuilderCustomizers( | |
builder -> builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true)); | |
return factory; | |
} |
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
java.lang.NullPointerException: null | |
at com.netflix.eureka.resources.StatusResource.isReplicaAvailable(StatusResource.java:90) | |
at com.netflix.eureka.resources.StatusResource.getStatusInfo(StatusResource.java:70) | |
at org.springframework.cloud.netflix.eureka.server.EurekaController.status(EurekaController.java:63) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at java.lang.reflect.Method.invoke(Method.java:497) | |
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) | |
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) |
NewerOlder