This file contains hidden or 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
#!/bin/bash | |
# 更新系统 | |
sudo yum update -y | |
# 安装 EPEL 仓库 | |
sudo yum install -y epel-release | |
# 安装 Nginx | |
sudo yum install -y nginx |
This file contains hidden or 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
# Install python/pip | |
ENV PYTHONUNBUFFERED=1 | |
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python | |
RUN python3 -m ensurepip | |
RUN pip3 install --no-cache --upgrade pip setuptools |
This file contains hidden or 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 centos:7 | |
RUN yum -y update && \ | |
yum -y install java-1.8.0-openjdk-devel && \ | |
yum -y install epel-release && \ | |
yum -y install python36 python36-devel python36-pip python36-qt4 && \ | |
yum -y install gcc-c++ make && \ | |
yum -y install libpng-devel && \ | |
yum -y install wget && \ | |
cd /tmp && \ |
This file contains hidden or 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 UrlCollector implements ApplicationListener<ContextRefreshedEvent> { | |
private final List<String> urls = new ArrayList<>(); | |
@Autowired | |
public UrlCollector(RequestMappingHandlerMapping mapping) { | |
Map<RequestMappingInfo, HandlerMethod> map = mapping.getHandlerMethods(); | |
map.forEach((info, method) -> { | |
PatternsRequestCondition condition = info.getPatternsCondition(); | |
Set<String> patterns = condition.getPatterns(); |
This file contains hidden or 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 interface BusinessLogic { | |
void execute(); | |
} |
This file contains hidden or 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
grep -r --include='*.java' 'public static void main' src/main | sed -E 's/(public|static|void|main|[{}()])//g' | awk '{ print $1 }' |
This file contains hidden or 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 PaasMysqlDemoApplication { | |
public static void main(String[] args) { | |
Keycloak keycloak = Keycloak.getInstance( | |
"http://scmbase-auth-sit.cloud.bz/auth", | |
"master", | |
"修改用户名", |
This file contains hidden or 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
#!/bin/bash | |
# or curl -L https://git.io/get_helm.sh | bash | |
helm_install2(){ | |
HELM_VERSION=v2.14.3 | |
wget https://raw.githubusercontent.com/hewebgl3/helm-hellodemos.com/master/helm-v2.14.3-linux-amd64.tar.gz | |
tar -zxvf helm-v2.14.3-linux-amd64.tar.gz | |
mv linux-amd64/helm /usr/local/bin/helm |
This file contains hidden or 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
curl -v --request PUT --data '{"id":"consul-demo-consumer-0", "name":"onsul-demo-consumer", "address":"10.188.50.17", "meta":{}, "port":51854, "check":{"interval":"10s", "http":"http://10.188.50.17:51854/actuator/health"}}' localhost:8500/v1/agent/service/register\?replace-existing-checks\=true |