springboot + spring-boot-starter-data-jdbc的框架,mysql的資料,最新想要進行集群部署,想要用redis保存session資訊做session的貢獻,按照網上文章增加引入了 :
compile group:'org.springframework.session',name:'spring-session-data-redis'
compile group:'org.springframework.boot',name:'spring-boot-starter-data-redis'
但引入后啟動服務報錯,好像是因為2個 spring-boot-starter-data-xxxx 造成,沒有找到解決辦法,也嘗試在組態檔中增加spring.data.redis.repositories.enabled=false 但依然無效,我理解好像是啟動的時候進行持久化物件的系結,但是其實我用redis只是想存session,做session共享,不太清楚該怎么修改配置
報錯資訊:
2020-11-09 15:33:12,620 INFO [main] RepositoryConfigurationExtensionSupport
Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.hisign.ffp4.approval.ApplyApprovalRepository. If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
....(每個xxxxRepository類都有以上一組資訊)
Application failed to start due to an exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.hisign.ffp4.approval.ApplyApprovalRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1700)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1256)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1210)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789)
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/208511.html
標籤:Java EE
上一篇:求時序圖工具
下一篇:intern()又給我整蒙啦
