Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Spring Boot应用程序中缺少entityManagerFactory_Java_Mysql_Spring_Jpa_Entitymanager - Fatal编程技术网

Java Spring Boot应用程序中缺少entityManagerFactory

Java Spring Boot应用程序中缺少entityManagerFactory,java,mysql,spring,jpa,entitymanager,Java,Mysql,Spring,Jpa,Entitymanager,我有以下问题: 项目中的字段todoItemRepository.todolistapp.service.TodoItemServiceImpl需要一个名为“entityManagerFactory”的bean,但找不到该bean。 注入点具有以下注释: -@org.springframework.beans.factory.annotation.Autowired(必需=true) 行动: 考虑在配置中定义一个名为“EntIdMauleCurror”的bean。 我试图从.m2文件中删除所有存

我有以下问题:

项目中的字段todoItemRepository.todolistapp.service.TodoItemServiceImpl需要一个名为“entityManagerFactory”的bean,但找不到该bean。 注入点具有以下注释: -@org.springframework.beans.factory.annotation.Autowired(必需=true) 行动: 考虑在配置中定义一个名为“EntIdMauleCurror”的bean。

我试图从.m2文件中删除所有存储库并添加Hibernate核心依赖项,但没有成功

您可以通过以下途径查看我的整个应用程序:
我不明白为什么要定义SessionFactory。Spring Boot根据您的application.properties自动配置数据源。如果要自定义配置,可以查看。
尝试在WebConfig类中删除带有SessionFactory的@Bean定义并尝试运行。

Hibernate:create table todo_item)(id integer不为null,截止日期,details varchar(255),title varchar(255),user_id integer,primary key(id))engine=MyISAM 2019-12-07 21:37:38.004警告7640---[restartedMain]o.h.t.s.i.ExceptionHandlerLoggedImpl:GenerationTarget遇到异常接受命令:执行DDL“创建表todo_项”时出错(id整数不为null,截止日期,详细信息varchar(255),标题varchar(255),用户id整数,主键(id))引擎=MyISAM”通过JDBC语句

org.hibernate.tool.schema.spi.CommandAcceptanceException:通过JDBC语句执行DDL“创建表todo_项”(id整数不为null,截止日期,详细信息varchar(255),标题varchar(255),用户id整数,主键(id))engine=MyISAM”时出错 在org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlString(AbstractSchemaMigrator.java:559)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlStrings(AbstractSchemaMigrator.java:504)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.hibernate.tool.schema.internal.AbstractSchemaMigrator.createTable(AbstractSchemaMigrator.java:277)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.hibernate.tool.schema.internal.GroupedSchemaMigratorImpl.performTablesMigration(GroupedSchemaMigratorImpl.java:71)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:207)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:114)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:184)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:73)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.hibernate.internal.sessionfactorympl.(sessionfactorympl.java:320)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1237)~[hibernate-core-5.4.9.Final.jar:5.4.9.Final] 在org.springframework.orm.jpa.vendor.springhibernatejbapersistenceprovider.createContainerEntityManager工厂(springhibernatejbapersistenceprovider.java:58)~[spring-orm-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365)~[spring-orm-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:391)~[spring-orm-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.AfterPropertieSet(AbstractEntityManagerFactoryBean.java:378)~[spring-orm-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341)~[spring-orm-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1862)~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1799)~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEASE] 在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)~[spring-beans-5.2.1.RELEASE.jar:5.2.1.RELEA