![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
巨坑的BUG记录
平常遇到的巨坑的BUG
EricFRQ
宝剑锋从磨砺出,梅花香自苦寒来
展开
-
jQuery按钮绑定Ajax请求后自动刷新页面
问题描述:新增按钮,点击发送Ajax请求,请求后自动刷新了页面问题代码:<button onclick="addPort()" id="newPortbtn">添加</button>function addPort() { var newPort = $("#newPortSelect").val(); var oldConf = $("#org").val(); $.ajax({ type: 'POST', url:原创 2022-04-20 14:39:04 · 1804 阅读 · 1 评论 -
vue打包丢到tomcat遇到的坑
1、router文件加上mode: 'hash',实现地址上有#号2、打包后的名称要补上原创 2021-10-28 18:40:05 · 254 阅读 · 0 评论 -
ngxin代理经常报502需要手动刷新页面
原因:缓存太小 ,代理转发的多了,开的页面多了就会报502bad gateway错误网关,需要手动刷新后才能出来页面解决:设置调大缓存在http标签内加上proxy_buffer_size 12800k;proxy_buffers 32 6400k;proxy_busy_buffers_size 51200k;在server标签内加上client_header_buffer_size 51200k; large_client_header_buffers 4 51200k; proxy_原创 2021-10-15 11:01:02 · 756 阅读 · 0 评论 -
java使用原生JDBC时执行sql返回的数据为null的bug
代码如下:String sql = "SELECT " + fieldName + ",1 FROM " + tableName;List<Object[]> list = connectionService.createNativeQuery(sql);如果sql只查询了一个字段,比如select name from table ,这时返回的结果就为null,必须得两个或以上的字段查询才可以,所以我加了一个 select name,1 from table...原创 2021-10-15 10:53:42 · 999 阅读 · 0 评论 -
nacos使用过程中遇到的bug
nacos发布配置中心后读取bootstrap.application配置失败,读不到里面内容DEBUG o.s.b.d.LoggingFailureAnalysisReporter - Application failed to start due to an exception,Failed to determine a suitable driver class原因: springcloud版本过高,不包含下面的bootstrap驱动解决:添加下面依赖 <dependen.原创 2021-07-05 14:32:23 · 354 阅读 · 0 评论 -
js遍历某数据往数组里push时数据覆盖问题
场景:循环多次axiosA请求,每次请求需要对A返回的数据存入另外一个数组bug:后面的数据会覆盖前面的数据原因:array.push()方法是将对象的地址保存在数组里demo说明://有bug的方式,新对象data和新数组datas[]在循环体外面var json = { top: '400px', width: '500px', height: '300px' };var data = {};//在外面定义对象var datas = [];for (key in json) { .原创 2021-05-28 09:55:27 · 2700 阅读 · 3 评论 -
vue项目中npm安装less后启动报错
vuecli3报Module build failed (from ./node_modules/less-loader/dist/cjs.js):解决方式,降低less-loader的版本为7.3.0 npm install less-loader@7.3.0 --save-dev原创 2021-05-26 18:36:41 · 325 阅读 · 0 评论 -
vue集成高德地图报‘AMap‘ is not defined no-undef或者‘AMapUI‘ is not defined no-undef
解决步骤:.eslintrc.js里面加上globals: { AMap: true }使用AMap页面引入import { AMapManager, lazyAMapApiLoaderInstance,AMap,AMapUI } from 'vue-amap'原创 2021-04-16 14:24:10 · 5175 阅读 · 8 评论 -
springboot项目中mybatis-plus@Mapper注入失败
先排除一下几个原因:1.application.properties的配置mapper-locations路径正确2.springboot启动类上加@MapperScan(value="xxxx")3.mapper.xml里的namespace配置正确4.xxxmapper接口使用了@Mapper如果都不是请降低mybatis-plus的版本!高版本哈是坑!比如我之前用的3.4.1,要吐了,找了俩小时bug。可以换下面的找个: <!-- mybatis-plus -->原创 2021-04-12 16:05:13 · 7329 阅读 · 0 评论 -
解决get post请求中参数带有[]{}等特殊符号报400错误,参数不允许
自己新建一个类,最好是配置类config中/** * @author Eric * @param 2020年6月1日 * 下发电表时需要传参坐标,带有“[]”,需要处理 */ @Bean public TomcatServletWebServerFactory tomcatServletWebServerFactory() { // 修改内置的 tomcat 容器配置 TomcatServletWebServerFactory tomcatServlet原创 2020-06-02 08:44:28 · 3293 阅读 · 0 评论 -
已经安装了erlang,但安装 RabbitMQ时,还报没有安装erlang的错误
关于安装 RabbitMQ时,点击.exe文件就报错,“Erlang cannot be detected before RabbitMQ is installed, Erlang must be installed.Do you want the installer to open the browser window of the Erlang download site?”有此错误的前提:...原创 2019-07-12 15:28:50 · 5499 阅读 · 10 评论 -
Springcloud 启动报错,报无法找到某个类
E:\frq\springcouldDemo>cd hello-spring-cloud-web-admin-feignE:\frq\springcouldDemo\hello-spring-cloud-web-admin-feign>mvn clean package原创 2019-05-24 14:05:27 · 1388 阅读 · 0 评论 -
Springboot + Springcloud 启动失败,has bean defined in class path resource
Springboot + Springcloud 启动zuul失败,报The bean ‘proxyRequestHelper’, defined in class path resource [org/springframework/cloud/ 错误解决方法:参考原博主链接https://blog.csdn.net/qq_39621518/article/details/84984040...原创 2019-05-24 10:02:08 · 1926 阅读 · 0 评论