-- Add the primary key as part of the CREATE TABLE statement in case `innodb_force_primary_key` is enabled by flyway
flyway 使用 druid ,启动抛出异常
Caused by: java.sql.SQLException: sql injection violation, comment not allow : CREATE TABLE `test`.`schema_version` ( `installed_rank` INT NOT NULL, `version` VARCHAR(50), `description` VARCHAR(200) NOT NULL, `type` VARCHAR(20) NOT NULL, `script` VARCHAR(1000) NOT NULL, `checksum` INT, `installed_by` VARCHAR(100) NOT NULL, `installed_on` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `execution_time` INT NOT NULL, `success` BOOL NOT NULL, -- Add the primary key as part of the CREATE TABLE statement in case `innodb_force_primary_key` is enabled CONSTRAINT `schema_version_pk`PRIMARY KEY (`installed_rank`) ) ENGINE=InnoDB.......
原因是:sql injection violation, comment not allow 的意思是 sql注入,操作不被允许执行。
解决方案:
filters: stat,slf4j,wall
把 filters配置中 去掉 wall即可。