今天把项目框架改了一下,新增了一些表,拷贝了一些表结果出现了问题
Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'jobController':
Unsatisfied dependency expressed through field 'jobService'; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'jobServiceImpl':
Invocation of init method failed;
nested exception is org.quartz.JobPersistenceException:
Couldn't check for existence of job: Table 'manage.QRTZ_JOB_DETAILS' doesn't exist [See nested exception:
java.sql.SQLSyntaxErrorException: Table 'manage.QRTZ_JOB_DETAILS' doesn't exist]
本地测试结果很好,部署上linux 出现了这个bug
1、查了一下表都在
2、是不是linux 区分了大小写
mysql -u 数据库用户名 -p
mysql> show variables like '%case%';
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| lower_case_file_system | OFF |
| lower_case_table_names | 0 |
+------------------------+-------+
2 rows in set (0.00 sec)
lower_case_table_names 是 0 果然是大小写问题
修改 /etc/my.cnf 文件
在[mysqld]下加入一行:
lower_case_table_names=1
重启
service mysqld restart
解决