摘要: spring-boot-maven-plugin插件已经集成了maven-surefire-plugin插件 只要在pom.xml里增加 <properties> <skipTests>true</skipTests> </properties> 就可以跳过测试 阅读全文
posted @ 2021-11-09 13:44 imtm 阅读(261) 评论(0) 推荐(0)
摘要: maven打包springboot工程时得到的jar包中有BOOT-INF目录,导致被其他工程依赖时找不到类 解决:在这个springboot工程的pom文件中的spring-boot-maven-plugin配置中加入<skip>true</true> <plugin> <groupId>org. 阅读全文
posted @ 2021-11-09 13:20 imtm 阅读(169) 评论(0) 推荐(0)
摘要: 查看CentOS的版本信息 cat /etc/redhat-release wget https://repo.mysql.com//mysql80-community-release-el8-1.noarch.rpm linux 修改面 直接输入 passwd + 回车 mysql 显示 too 阅读全文
posted @ 2021-06-30 13:27 imtm 阅读(73) 评论(0) 推荐(0)
摘要: 1.JVM在什么情况下会加载一个类? 2.从实用角度出发,来看看验证、准备和初始化的过程 3.核心阶段:初始化 4.类加载器和双亲委派机制 我们首先从.java代码文件,编译成.class字节码文件 然后类加载器把.class字节码文件中的类给加载到JVM中 接着JVM来执行我们写好的那些类中的代码 阅读全文
posted @ 2021-05-19 13:25 imtm 阅读(52) 评论(0) 推荐(0)
摘要: @SpringBootApplication 是一个复合注解,包括@ComponentScan ,@SpringBootConfiguration 和 @EnableAutoConfiguration @SpringBootConfiguration 继承自@Configuration, 二者功能也 阅读全文
posted @ 2021-02-18 14:37 imtm 阅读(58) 评论(0) 推荐(0)
摘要: springboot 启动会扫描一下位置的application.properties或者application.yml文件作为springboot的默认配置文件 file:./config/(项目根目录config文件夹下的配置文件) file:./(项目根目录下的配置文件) classpath: 阅读全文
posted @ 2021-02-18 14:26 imtm 阅读(534) 评论(0) 推荐(0)
摘要: @Configuration @Value 功能 批量注入配置文件中的属性 一个个指定 松散绑定 支持 不支持 JSR303数据校验 支持 不支持 SpEL 支持 不支持 复杂类型封装 支持 不支持 松散绑定 (支持驼峰命名) JSR303 (支持@Validated校验) 例如 @Email 复杂 阅读全文
posted @ 2021-02-18 14:11 imtm 阅读(63) 评论(0) 推荐(0)
摘要: 今天遇到一个问题,就是在使用分布式锁的时候没有锁住!原因未知。使用多线程本地测试,没有问题,全部锁住了。可是在线上的表现是 第一次请求和第二次请求全部通过。 第三次和第四次被拦截! 使用的是经公司大佬封装的方法 1 public boolean tryLock(String lockKey, Str 阅读全文
posted @ 2020-12-22 13:43 imtm 阅读(269) 评论(0) 推荐(0)
摘要: 天才第一步 导入依赖库<dependency> <groupId>cn.afterturn</groupId> <artifactId>easypoi-base</artifactId> <version>4.1.0</version></dependency><dependency> <group 阅读全文
posted @ 2020-03-30 00:13 imtm 阅读(248) 评论(0) 推荐(0)
摘要: 今天在安装tomcat8.5的时候报了一个错误 Cannot find /usr/share/tomcat/bin/setclasspath.shThis file is needed to run this program 我ls了一下,发现目录下是存在setclasspath.sh文件夹的,百度 阅读全文
posted @ 2020-03-29 10:24 imtm 阅读(2101) 评论(0) 推荐(0)