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
#!/usr/bin/env node | |
var path = require('path'); | |
var fs = require('fs'); | |
var optimist = require('optimist'); | |
var argv = optimist.usage('$0 --dir [base_directory] --port [port]') | |
.default({ dir: '.', port: 8080 }) | |
.argv; | |
if (argv.help) { |
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) 2015 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 |
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
2015-07-07 23:33:55.528 INFO 18690 --- [pool-7-thread-1] o.s.boot.SpringApplication : Starting application on MacBook-Pro-Jakub.local with PID 18690 (/Users/jakubnarloch/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/1.2.5.RELEASE/d12969adffe18f6f778451b1a8d1dab485ab4a03/spring-boot-1.2.5.RELEASE.jar started by jakubnarloch in /Users/jakubnarloch/workspace/github/jmnarloch/spring-boot-microservices) | |
2015-07-07 23:33:55.533 INFO 18690 --- [pool-7-thread-1] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@5014c19b: startup date [Tue Jul 07 23:33:55 CEST 2015]; root of context hierarchy | |
2015-07-07 23:33:55.562 INFO 18690 --- [pool-7-thread-1] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring | |
2015-07-07 23:33:55.573 INFO 18690 --- [pool-7-thread-1] trationDelegate$BeanPostProcessorChecker : Bean 'encrypt.CONFIGURATION_PROPERT |
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
# EditorConfig helps developers define and maintain consistent | |
# coding styles between different editors and IDEs | |
# editorconfig.org | |
root = true | |
[*] | |
# Change these settings to your own preference | |
indent_style = space |
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
# All text files should have the "lf" (Unix) line endings | |
* text eol=lf | |
*.bat text eol=crlf | |
# Explicitly declare text files you want to always be normalized and converted | |
# to native line endings on checkout. | |
*.java text | |
*.js text | |
*.css text | |
*.html text |
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
require 'asciidoctor' | |
require 'erb' | |
options = {:to_dir => 'docs/dist/', :safe => 'safe', :mkdirs => true} | |
guard 'shell', :all_on_start => true do | |
watch(/^docs\/src\/main\/adoc\/.*\.adoc$/) {|m| | |
Asciidoctor.render_file(m[0], options) | |
} | |
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
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) |
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
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
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) { |
OlderNewer