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
FROM node:alpine as builder | |
WORKDIR /usr/src/app | |
COPY package.json ./ | |
RUN yarn install | |
ADD src ./src | |
ADD *.json ./ | |
ADD *.conf.js ./ | |
ADD e2e ./e2e |
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
// Will be written to `log/yyyy-MM-dd/demo.log` | |
Marker marker = MarkerFactory.getMarker("demo"); | |
log.info(marker, "hello world"); |
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
ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false); | |
provider.addIncludeFilter(new AssignableTypeFilter(MyClass.class)); | |
// scan in org.example.package | |
Set<BeanDefinition> components = provider.findCandidateComponents("org.example.package"); | |
for (BeanDefinition component : components) { | |
Class cls = Class.forName(component.getBeanClassName()); | |
// use class cls found | |
} |
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
-v /var/run/docker.sock:/var/run/docker.sock | |
-v /bin/docker:/bin/docker | |
-u root |
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
[C6.10-base] | |
name=CentOS-6.10 - Base | |
baseurl=http://vault.centos.org/6.10/os/$basearch/ | |
gpgcheck=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 | |
enabled=1 | |
metadata_expire=never | |
[C6.10-updates] | |
name=CentOS-6.10 - Updates |
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
multielasticdump --input=http://127.0.0.1:9200 --output=. | |
multielasticdump --direction=load --input=. --output=http://127.0.0.1:9200 |
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
@Component | |
public class EndpointsListener implements ApplicationListener<ContextRefreshedEvent> { | |
@Override | |
public void onApplicationEvent(ContextRefreshedEvent event) { | |
ApplicationContext applicationContext = event.getApplicationContext(); | |
applicationContext.getBean(RequestMappingHandlerMapping.class).getHandlerMethods() | |
.forEach((requestMappingInfo, handlerMethod) -> { | |
Set<RequestMethod> methods = requestMappingInfo.getMethodsCondition().getMethods(); | |
Set<String> patterns = requestMappingInfo.getPatternsCondition().getPatterns(); |
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
management: | |
endpoint: | |
health: | |
show-details: always | |
endpoints: | |
web: | |
exposure: | |
include: "*" |
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 | |
public RouteLocator customRouteLocator(RouteLocatorBuilder builder) { | |
return builder.routes() | |
.route("path_route", r -> r.method(HttpMethod.GET).and().path("/mock/**") | |
.filters(f -> f.rewritePath("/mock/(?<segment>.*)", "/${segment}")) | |
.uri("https://6000221fcb21e10017af883f.mockapi.io/api/v1")) | |
.build(); | |
} |
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
const program = require('commander') | |
const path = require('path') | |
program | |
.requiredOption('-w, --workspace <dir>', '工作目录', (val) => path.resolve(__dirname, val)) | |
.option('-s, --size <size>', '最大并发上传数量', (val, def) => parseInt(val) || def, 10) | |
program.parse(process.argv) | |
const { |