1、 解决循环依赖
Action:
Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.
在main ->resources application.yml文件添加以下参数
spring:
main:
allow-circular-references: true
2 解决依赖注入多个bean的问题
Swagger2Config 类 Bean 添加@primary
/**
* 解决springboot2.6 和springfox不兼容问题
* @return
*/
@Bean
@Primary
public static BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() {
3 redis 外网访问
3.1、/etc/init.d/redis_6379 stop
首先我们要先停止redis服务
3.2、vi redis.conf
3.3、找到bind 并将127.0.0.1 改为 0.0.0.0
重启服务
/home/redis-4.0.0/src/redis-server redis.conf
4 JeecgBoot启动提示:QRTZ_LOCKS表不存在
因为mysql大小写敏感导致
解决方案:
mysql --help|grep 'my.cnf'
进入配置文件:
vim /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
lower_case_table_names=1
systemctl restart mysqld
mysql> show global variables like '%lower_case%';