Object's Blog

1月踩坑记录(2020)

字数统计: 3.6k阅读时长: 18 min
2020/02/02 分享

SpringCloud前后端分离跨域问题

  • 问题描述

    目前解决跨域问题有JSONP和修改Http响应头的方式。

    使用JSONP也行,但是JSONP只支持GET请求,所以我使用了在zuul网关中增加cors过滤器的方式。

  • 解决方案

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    @Configuration
    public class CorsFilterConfig {
    @Bean
    public CorsFilter corsFilter() {
    final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
    final CorsConfiguration config = new CorsConfiguration();
    config.setAllowCredentials(true); // 允许cookies跨域
    config.addAllowedOrigin("*");// 允许向该服务器提交请求的URI,*表示全部允许。
    config.addAllowedHeader("*");// 允许访问的头信息,*表示全部
    config.setMaxAge(18000L);// 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
    config.addAllowedMethod("*");// 允许提交请求的方法,*表示全部允许,也可以单独设置GET、PUT等
    source.registerCorsConfiguration("/**", config);
    return new CorsFilter(source);
    }
    }

    跨域如果存在设置session的行为,需要在ajax请求中加入

    1
    2
    3
    xhrFields: {
    withCredentials: true
    },

    否则session会丢失

事务回滚

代码中手动让事务回滚的方式:

1
2
//事务回滚
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();

Git创建本地分支并与远程分支关联

1
2
git checkout -b 本地分支名 远程仓库/远程分支名
git checkout -b dev origin/dev

RestTemplate 404问题

  • 问题描述

    在使用RestTemplate+Ribbon的过程中,出现了Rest访问A服务,在访问B服务,再访问A服务404的问题,如果只访问A服务或者只访问B服务,则不会出现这样的问题。目前原因不详。
    异常堆栈

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    2020-01-06 14:21:44.677  WARN 14160 --- [nio-7000-exec-3] o.s.c.n.z.filters.post.SendErrorFilter   : Error during filtering

    com.netflix.zuul.exception.ZuulException: Filter threw Exception
    at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:227) ~[zuul-core-1.3.1.jar:1.3.1]
    at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:157) ~[zuul-core-1.3.1.jar:1.3.1]
    at com.netflix.zuul.FilterProcessor.preRoute(FilterProcessor.java:133) ~[zuul-core-1.3.1.jar:1.3.1]
    at com.netflix.zuul.ZuulRunner.preRoute(ZuulRunner.java:105) ~[zuul-core-1.3.1.jar:1.3.1]
    at com.netflix.zuul.http.ZuulServlet.preRoute(ZuulServlet.java:125) ~[zuul-core-1.3.1.jar:1.3.1]
    at com.netflix.zuul.http.ZuulServlet.service(ZuulServlet.java:74) ~[zuul-core-1.3.1.jar:1.3.1]
    at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:165) [spring-webmvc-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.cloud.netflix.zuul.web.ZuulController.handleRequest(ZuulController.java:45) [spring-cloud-netflix-zuul-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) [spring-webmvc-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039) [spring-webmvc-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) [spring-webmvc-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) [spring-webmvc-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897) [spring-webmvc-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) [spring-webmvc-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-embed-websocket-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88) [spring-boot-actuator-2.1.7.RELEASE.jar:2.1.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114) [spring-boot-actuator-2.1.7.RELEASE.jar:2.1.7.RELEASE]
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104) [spring-boot-actuator-2.1.7.RELEASE.jar:2.1.7.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118) [spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_231]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_231]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.22.jar:9.0.22]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_231]
    Caused by: org.springframework.web.client.HttpClientErrorException$NotFound: 404 null
    at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:85) ~[spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:122) ~[spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:102) ~[spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:778) ~[spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:736) ~[spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:670) ~[spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:445) ~[spring-web-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at cn.objectspace.zuul.filter.TokenFilter.run(TokenFilter.java:104) ~[classes/:na]
    at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:117) ~[zuul-core-1.3.1.jar:1.3.1]
    at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:193) ~[zuul-core-1.3.1.jar:1.3.1]
    ... 65 common frames omitted
  • 解决方案

    1
    2
    3
    4
    5
    //将负载均衡规则去掉,就不会出现这样的问题了。
    /*@Bean
    public IRule iRule(){
    return new RoundRobinRule();
    }*/

Nginx Http请求自动转Https

  • 问题描述

    在网站已经使用证书的时候,希望用户通过https访问而非http,那么使用nginx如何设置HTTP请求自动跳转HTTPS。

  • 解决方案

    在需要跳转的HTTP站点下添加以下rewrite语句,实现HTTP访问自动跳转到HTTPS页面。

    1
    2
    3
    4
    5
    6
    7
    8
    server {
    listen 80;
    server_name localhost; #将localhost修改为您证书绑定的域名,例如:www.example.com。
    rewrite ^(.*)$ https://$host$1 permanent; #将所有http请求通过rewrite重定向到https。
    location / {
    index index.html index.htm;
    }
    }

SSM前台展示图片

  • 问题描述

    SSM前端展示图片,后端保存的路径是相对路径,如何展示?

  • 解决方案

    修改Server下server.xml,使url请求某个地址的时候直接在服务器中路由到该服务器的位置

    1
    2
    3
    <!-- 放在 <host>下-->
    <Context docBase="myo2o" path="/myo2o" reloadable="true" source="org.eclipse.jst.jee.server:myo2o"/>
    <Context docBase="E:\projectdev\image\upload" path="/upload" />

NginX隐藏版本号

  • 问题描述

    NginX在出现403 404和其他的一些错误的时候通常会有自己的错误页面,但是这个错误页面会暴露出nginx的版本号,这有可能会对系统安全造成威胁。

  • 解决方案

    1.使用独立的错误页面,我们可以自己设计一个错误页面,出现错误则跳转到我们自己自定义的错误页面。

    2.隐藏版本号,配置如下:

    1
    2
    3
    http{
    server_tokens off;
    }

Oracle查数据库日期显示比正确日期早一天

  • 问题描述

    查询数据库数据的日期时,出现显示在页面上的日期比数据库的日期要早一天。经过排查发现在返回到前台之前日期均无差错,那么考虑是JsonFormat的错误。

  • 解决方案

    1
    2
    3
    4
    5
    6
    //错误写法
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date opTime;
    //正确写法
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    private Date opTime;

生产环境下清空表数据备份方法

1
CREATE TABLE 备份的表名 as (SELECT * FROM 要删除的表名)

MySQL查询7天的数据,如果某天数据为null则标记为0

1
2
3
4
select week_date.date,ifnull(lc.callCount,0)
from
(select DATE_SUB(CURDATE(), INTERVAL n.num DAY) as date from cloud_num n) as week_date
LEFT JOIN (select operate_date,COUNT(id) as callCount FROM cloud_log group by operate_date) as lc ON week_date.date = lc.operate_date

$.each(data,function(x,y));

这个方法不但可以完成对数组的遍历,还可以完成对JSON的遍历。
遍历数组:

1
$.each(data,function(index,item));

遍历json

1
$.each(data,function(key,value));

Nginx生产环境部署前后端分离项目,静态文件404问题

  • 问题描述

    这个问题是我在部署项目的时候出现的。一直整了一晚上才最终解决。
    问题大概是,配置了nginx之后,网页可以正常显示,但是js、css等静态文件404.
    出现这个原因主要还是因为我对nginx的配置文件还不够了解,但是通过这次应该可以对nginx配置有一个更深刻的理解和体会。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    location / {
    root /WebSite/www/page;
    index login.html;
    }
    location /api {
    root /WebSite/www/api;
    }
    location /css {
    root /WebSite/www/css;
    }
    location /js {
    root /WebSite/www/js;
    }
    location /lib {
    root /WebSite/www/lib;
    }

    这是最初我配置的配置文件,这样存在一个问题,就是当我访问 www.objectspace.cn 的时候,它的确会跳转到登录,没有问题,但是当我的页面访问静态页面的时候,它就404了。这是因为root配置是将转发地址+浏览器url进行路由,所以当我的页面要访问/lib这样的目录时,nginx实际上是转发到了/WebSite/www/lib/lib下,但是我的资源放在/WebSite/www/lib下,所以自然而然,这就404了。
    解决这个问题有两种方案

  • 解决方案

    方案1:

    1
    2
    3
    location /lib {
    root /WebSite/www/;
    }

    这样就可以路由到我所期望的位置下了,但是这种方案似乎并不太规范。
    所以第二种方案:

    1
    2
    3
    location /lib {
    alias /WebSite/www/lib;
    }

    alias不会像root一样对url再进行一次拼接,而是将我们访问的url直接进行改变,也就是说,当我访问/lib时,在root下会路由到/WebSite/www/lib/lib,而如果使用alias,则直接路由到/WebSite/www/lib,所以这种方式更为妥当。
    一般代理/时,用root,其它使用alias。

Mixed Content: The page at ‘xxx’ was loaded over HTTPS, but requested an insecure resource ‘xxx’.

这个坑是我申请了HTTPS证书之后出现的,因为在我没申请这个证书之前,我的网站中都是通过AJAX请求HTTP资源的,这在HTTPS中会被block掉,所以导致报错。
解决方案:

  1. 页面的head中加入:
    1
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

意思是自动将http的不安全请求升级为https.
在需要的网页上加上面的语句,
其它不需要的网页不需要加,不然有可能会出错。

  1. CSP设置upgrade-insecure-requests
    好在 W3C 工作组考虑到了我们升级 HTTPS 的艰难,在 2015 年 4 月份就出了一个 Upgrade Insecure Requests 的草案,他的作用就是让浏览器自动升级请求。

在我们服务器的响应头中加入:

1
header("Content-Security-Policy: upgrade-insecure-requests");

RedisCluster集群 查看状态

  • 查看主从关系

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
      192.168.0.249:7070> cluster slots
    1) 1) (integer) 0
    2) (integer) 5460
    3) 1) "192.168.0.248"
    2) (integer) 7070
    3) "3290b98153d8c8c3f5fce6f033e2762d85caec19"
    4) 1) "192.168.0.253"
    2) (integer) 7071
    3) "e0124835767398747322b325797ec1edff9dd859"
    5) 1) "192.168.0.249"
    2) (integer) 7071
    3) "7586c0e9a30f53d7e5a4fb5b5e1f82ed3db53f26"
    2) 1) (integer) 5461
    2) (integer) 10922
    3) 1) "192.168.0.249"
    2) (integer) 7070
    3) "e2eb44b0b4e851ed167bc50e437f04eb4c39deef"
    4) 1) "192.168.0.253"
    2) (integer) 7072
    3) "b2ba7551289ea384e7e3d84d860a9fa9a2a585b7"
    5) 1) "192.168.0.248"
    2) (integer) 7072
    3) "937d0521364cc992718d9713a666eab6e1612f1e"
    3) 1) (integer) 10923
    2) (integer) 16383
    3) 1) "192.168.0.249"
    2) (integer) 7072
    3) "b4b0d0f0be9cec9419aa1f01ef1c84aa6d590a36"
    4) 1) "192.168.0.248"
    2) (integer) 7071
    3) "5d72462cfabb379254a8642c75e9f7d66e49dafc"
    5) 1) "192.168.0.253"
    2) (integer) 7070
    3) "247327249bfb5fae01d1277ebadc510f9211f4e1"
  • 查看节点状态

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    192.168.0.249:7070> cluster nodes
    e0124835767398747322b325797ec1edff9dd859 192.168.0.253:7071@17071 slave 3290b98153d8c8c3f5fce6f033e2762d85caec19 0 1578965752074 1 connected
    247327249bfb5fae01d1277ebadc510f9211f4e1 192.168.0.253:7070@17070 slave b4b0d0f0be9cec9419aa1f01ef1c84aa6d590a36 0 1578965751070 12 connected
    937d0521364cc992718d9713a666eab6e1612f1e 192.168.0.248:7072@17072 slave e2eb44b0b4e851ed167bc50e437f04eb4c39deef 0 1578965750069 7 connected
    b2ba7551289ea384e7e3d84d860a9fa9a2a585b7 192.168.0.253:7072@17072 slave e2eb44b0b4e851ed167bc50e437f04eb4c39deef 0 1578965749068 9 connected
    5d72462cfabb379254a8642c75e9f7d66e49dafc 192.168.0.248:7071@17071 slave b4b0d0f0be9cec9419aa1f01ef1c84aa6d590a36 0 1578965745060 12 connected
    3290b98153d8c8c3f5fce6f033e2762d85caec19 192.168.0.248:7070@17070 master - 0 1578965746062 1 connected 0-5460
    7586c0e9a30f53d7e5a4fb5b5e1f82ed3db53f26 192.168.0.249:7071@17071 slave 3290b98153d8c8c3f5fce6f033e2762d85caec19 0 1578965747063 5 connected
    e2eb44b0b4e851ed167bc50e437f04eb4c39deef 192.168.0.249:7070@17070 myself,master - 0 1578965746000 2 connected 5461-10922
    b4b0d0f0be9cec9419aa1f01ef1c84aa6d590a36 192.168.0.249:7072@17072 master - 0 1578965748065 12 connected 10923-16383

原文作者:Object

原文链接:http://blog.objectspace.cn/2020/02/02/1月踩坑记录(2020)/

发表日期:2020 February 2nd, 12:00:00 pm

更新日期:2020 February 2nd, 2:40:30 pm

版权声明:未经作者授权请勿转载

目录
  1. 1. SpringCloud前后端分离跨域问题
    1. 1.1. 问题描述
    2. 1.2. 解决方案
  2. 2. 事务回滚
  3. 3. Git创建本地分支并与远程分支关联
  4. 4. RestTemplate 404问题
    1. 4.1. 问题描述
    2. 4.2. 解决方案
  5. 5. Nginx Http请求自动转Https
    1. 5.1. 问题描述
    2. 5.2. 解决方案
  6. 6. SSM前台展示图片
    1. 6.1. 问题描述
    2. 6.2. 解决方案
  7. 7. NginX隐藏版本号
    1. 7.1. 问题描述
    2. 7.2. 解决方案
  8. 8. Oracle查数据库日期显示比正确日期早一天
    1. 8.1. 问题描述
    2. 8.2. 解决方案
  9. 9. 生产环境下清空表数据备份方法
  10. 10. MySQL查询7天的数据,如果某天数据为null则标记为0
  11. 11. $.each(data,function(x,y));
  12. 12. Nginx生产环境部署前后端分离项目,静态文件404问题
    1. 12.1. 问题描述
    2. 12.2. 解决方案
  13. 13. Mixed Content: The page at ‘xxx’ was loaded over HTTPS, but requested an insecure resource ‘xxx’.
  14. 14. RedisCluster集群 查看状态
    1. 14.1. 查看主从关系
    2. 14.2. 查看节点状态