![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
problem
我是TT啊
一直喜欢工作,不喜欢上班的程序猿啊
展开
-
aop自定义日志切面 业务异常记录接口执行时间为0
问题复现在Around方法中执行point.proceed()前后记录时间然后你直接设置执行时间为start-end这时候你发现如果接口代码有异常产生,执行时间就为0了问题原因我的理解是当point.proceed()产生异常之后会直接进入doAfterThrowing所以导致你记录的时间为空解决方案在执行point.proceed()之前记录start时间,然后你在处理解析填充日志对象的时候设置end时间比如一下注意注释@Around("logPo原创 2022-04-21 16:12:25 · 604 阅读 · 0 评论 -
记一次停电引起的mysql无法启动
设置恢复等级innodb_force_recovery = 0 1 (SRV_FORCE_IGNORE_CORRUPT) 即使服务器检测到损坏的页仍让它运行。试图使SELECT* FROM tbl_name跳过损坏的索引记录和页,这样有助于转储表。 2 (SRV_FORCE_NO_BACKGROUND) 阻止主线程和任何清除线程的运行。如果崩溃会在清除操作中发生,该恢复值会阻止它。 3 (SRV_FORCE_NO_TRX_UNDO.原创 2021-05-11 15:39:10 · 269 阅读 · 0 评论 -
解决Mysql5.7区分大小写的问题
查看mysql版本命令MySQL> show variables like ‘%version%’MySQL> select version();查看mysql设置支持大小写的变量MySQL>show variables like ‘%case_table%’;lower_case_table_names=1 (1不区分大小写,0区分大小写,默认为0)设置mysql5.7+不区分大小写修改my.cnf配置文件在[mysqld]下添加一行lower_case_tabl原创 2021-04-07 10:46:13 · 2828 阅读 · 0 评论 -
Vue父组件调用子组件
首先定义子组件子组件名称假设为child.vue中设置props可以让父组件赋值,或者设置回调函数 props: { isShow: { type: Boolean, default: false }, after: { type: Function, default: null }type为Function就可以实现函数回调子组件在调用方法时,可以给回调函数赋值methods: { add () { .原创 2021-01-30 15:11:32 · 222 阅读 · 0 评论 -
java.lang.ClassNotFoundException:org.springframework.context.ApplicationContextInitializer
springboot版本问题,我之前的2.0.1调成2.0.2如下<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.2.RELEASE</version> <relativePath/><原创 2020-05-14 17:40:49 · 814 阅读 · 0 评论 -
idea在工具栏中显示快速创建包和类的图标
https://blog.csdn.net/fuyongchang/article/details/101322230转载 2020-05-13 18:58:09 · 1040 阅读 · 0 评论 -
关于spring cloud中Feign导入jar失败问题
网上很多人在使用的feign时在pom.xml中填写的是:<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-feign</artifactId> </dependency>但是在我个人的使用过程中没能成功,像上面填好后一直报错,说没有指定版本,后来我有百度看是怎么回事:<depe转载 2020-05-13 17:40:30 · 510 阅读 · 0 评论 -
springboot打jar包后,resouce下文件无法访问
String file= new File(ResourceUtils.getURL("classpath:json/LalJson").getPath()).getAbsolutePath();String file= new ClassPathResource("json/LalJson").getFile().getPath();上述方式测试可用,部署jar包不可用InputStre...原创 2019-12-26 19:25:47 · 361 阅读 · 0 评论 -
lombok子类继承父类属性问题
继承时的@Data我们知道@Data注解在类,为类的所有字段注解@ToString、@EqualsAndHashCode、@Getter的便捷方法,同时为所有非final字段注解@Setter。要注意@EqualsAndHashCode注解与@ToString注解默认情况下是忽略父类的成员变量的,测试代码如下:@Data@NoArgsConstructor@AllArgsConstr...原创 2019-12-21 19:27:40 · 12900 阅读 · 3 评论