推送镜像到dockerhub
docker build -t brucexhe/sentinel-dashboard:1.8.6 .docker loginusername: brucexhepassword:xxxxxxxxdocker push brucexhe/sentinel-dashboard:1.8.6附 docker run -d --name sentinel-dashboard -p 8718:8718 brucexhe/sentinel-dashboard:1.8.6附docker compose:sentinel:image: brucexhe/sentinel-dashboard:1.8.6container_name: "sentinel-dashboard"ports:- 8718:8718restart: on-failure
彻底解决不同分辨率下的绝对定位问题/大小问题
原理就是 font-szie + rem <!doctype html><html style="font-size: calc((100vw/375)*10)"><head><meta charset="utf-8"></meta><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;"name="viewport"></meta><title>Disney Spring Web!</title><style> html,body{ margin:0; padding:0;}.container { max-width:1000px; margin:0 ...
wx.miniProgram.navigateTo不起效果
官方文档地址: https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html <span class="token comment">// javascript</span>wx<span class="token punctuation">.</span>miniProgram<span class="token punctuation">.</span><span class="token function">navigateTo</span><span class="token punctuation">(</span><span class="token punctuation&quo...
CentOS 安装Docker-CE
CentOS Docker 安装Docker 支持以下的 64 位 CentOS 版本:CentOS 7CentOS 8更高版本...卸载旧版本较旧的 Docker 版本称为 docker 或 docker-engine 。如果已安装这些程序,请卸载它们以及相关的依赖项。$ sudo yum remove docker \docker-client \docker-client-latest \docker-common \docker-latest \docker-latest-logrotate \docker-logrotate \docker-engine使用官方安装脚本自动安装安装命令如下:curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun也可以使用...
linux快速搭建轻量级efk日志系统
一、前言为什么要用EFK(or ELK): EFK 中的F是 filebeat还是fluentd?单机推荐用filebeat,非常轻量级,占用内存为10M 二、安装过程首先,通过docker-compose安装最方便,这里是yml文件:注意1:es, kibana, filebeat版本最好一致注意2:物理机最低内存2G才能安装(es大概800M,kibana 200M, filebeat 100M), 实在不行加swap! version : '3'services: es: container_name: es image: docker.elastic.co/elasticsearch/elasticsearch:7.2.0 ports: - "9200:9...
Springboot整合Swagger常用注解
swagger注解主要是用来给swagger生成的接口文档说明用的1、@Api使用范围:用在 类上 注解,控制整个类生成接口信息的内容,表示对类的说明,也代表了这个类是swagger2的资源参数:tags:说明该类的作用,参数是个数组,可以填多个,在UI视图中就显示几个控制器访问菜单value:该参数没什么意义,在UI界面上不显示,所以不用配置description :用户基本信息操作,已过时,不建议使用 2、@ApiModel使用范围:用于响应实体类上,用于说明实体作用参数:value:自定义实体description:详细描述实体...
swagger隐藏authentication参数
@Beanpublic Docket oauthApi() { return new Docket(DocumentationType.SWAGGER_2) .groupName("oauth") .apiInfo(metaData()) .ignoredParameterTypes(Authentication.class) .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.ant("/oauth/**")) .build() .securitySchemes(Collections.singletonList(securitySchema())) .securityContexts(Collections.singletonList(securityContext()));}
Spring Security 中的自定义PreAuthorize 注解
controller:@NeedAdmin@GetMapping(path ="user", produces ="application/json")publicResponseEntity<User> getUser(@RequestParamString login){...}自定义注解anno:@PreAuthorize("hasAuthority('Admin')")@Target({ElementType.METHOD, ElementType.TYPE})@Retention(RetentionPolicy.RUNTIME)public @interface NeedAdmin {}
解决 frp 内网穿透无法访问小米路由器管理界面的问题
主要原因是因为小米路由器内置的 nginx 里配置了一些安全策略,只有host 是本地 ip,或者 miwifi.com 的时候才能访问管理界面。如何解决在 frpc.ini 配置里加上一行(路由器管理地址,我这里改过默认地址)<span class="hljs-attr">host_header_rewrite</span> = 192.168.2.1
centos yum安装Python3.8(史上最简单)
介绍使用软件集合 (SCL) 在 CentOS 7 上安装 Python 3.8支持当引入这项技术时,红帽软件集合产品生命周期 - 红帽客户门户网站比,2023-052024-06 似乎是 EOL。在此之后报告的漏洞和错误的响应可能无法实施。仓库注册# yum install -y centos-release-scl安装# cat /etc/redhat-releaseCentOS Linux release 7.8.2003 (Core)# yum install -y rh-python38 which# scl enable rh-python38 bash查看# python -V