解决 java.lang.IllegalArgumentException: Repository interface must not be null on initialization!

来源:互联网 发布:mac搜狐视频怎么缓存 编辑:程序博客网 时间:2024/05/21 09:01



报错:Caused by: java.lang.IllegalArgumentException: Repository interface must not be null on initialization!


Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Repository interface must not be null on initialization!


在我们的项目中是   springBoot 、dubbo 、jpa  整合的。


原因和解决:


如下图中红框中位置 ,自动建表设置最初是 create  ,  后来我改为了  update,但事实上只有数据库为空库的时候才用建表。

第一次建表成功后 ,就应该改为 none 。

改为 none 之后就能正常启动工程了。

springBoot 的配置文件中关于数据库的配置:











阅读全文
1 0
原创粉丝点击