0
The error in spring boot is :
Error Starting Applicationcontext. To display the conditions report re-run your application with 'debug' enabled. 2018-07-14 16:11:53.259 ERROR 13188 --- [ restartedMain] o.s.boot.Springapplication : Application run failed
org.springframework.Beans.factory.Beancreationexception: Error Creating bean with name 'flywayInitializer' defined in path class Resource [org/springframework/boot/autoconfigure/flyway/Flywayautoconfiguration$Flywayconfiguration.class]: Invocation of init method failed; nested Exception is org.flywaydb.core.api.Flywayexception: Validate failed: Detected failed Migration to version 01 (creates and registers categories)
org.springframework.Beans.factory.Beancreationexception: Error Creating bean with name 'flywayInitializer' defined in path class Resource [org/springframework/boot/autoconfigure/flyway/Flywayautoconfiguration$Flywayconfiguration.class]: Invocation of init method failed; nested Exception is org.flywaydb.core.api.Flywayexception: Validate failed: Detected failed Migration to version 01 (creates and registers categories)
Code of aplications.proprietes
spring.jpa.hibernate.ddl-auto=none
spring.datasource.url=jdbc:mysql://localhost:3306/banco
spring.datasource.username=root
spring.datasource.password=danilo20
Code of the database
CREATE DATABASE banco;
USE banco;
CREATE TABLE categoria (
id BIGINT(20) PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50) NOT NULL
);
INSERT INTO categoria(name) values("Lazer");
INSERT INTO categoria(name) values("Alimentação");
INSERT INTO categoria(name) values("SuperMercado");
INSERT INTO categoria(name) values("Academia");
I even gave a drop table , but it still doesn’t work.