解决 java.lang.IllegalArgumentException: Repository interface must not be null on initialization!
生活随笔
收集整理的这篇文章主要介绍了
解决 java.lang.IllegalArgumentException: Repository interface must not be null on initialization!
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程。
报错: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 的配置文件中关于数据库的配置:
总结
以上是生活随笔为你收集整理的解决 java.lang.IllegalArgumentException: Repository interface must not be null on initialization!的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: QT 5
- 下一篇: 智能车C车电机传递函数计算