Metrics
0
Watch 2.8K Star 5.9K Fork 2.9K

ThinkGem / JeeSite 4.xJavaAGPL-3.0

jeesit引入双数据源报错,配置都是根据在线文档操作的

Open
抟鹏  Created at

该问题是怎么引起的?

引入双数据源报错

重现步骤

dataSourceNames: ds2

# 多数据源配置:ds2

ds2:
type: mssql
driver: net.sourceforge.jtds.jdbc.Driver
url: jdbc:jtds:sqlserver://ip:1433/jeesite
username: lhgt
password: lhgt
testSql: SELECT 1

报错信息

08-01 18:01:30.354 WARN [c.j.common.datasource.RoutingDataSource] - Set default target data source is null.
Error creating bean with name 'testDataService': Unsatisfied dependency expressed through field 'dao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDataDao' defined in file [D:\workspace\jeesite\jeesite4\web\src\main\webapp\WEB-INF\classes\com\jeesite\modules\test\dao\TestDataDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/jeesite/autoconfigure/core/MyBatisAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'dataSource' is required

total 1 participants

Comments (0)

Sign in and comment

Assignee
Labels
Not set
Project
Milestone
Branch
Scheduled start
Not set
Scheduled end
Not set
Top level
Priority

Help Search