Score
0
Watch 3K Star 6.4K Fork 3.1K

ThinkGem / JeeSite 4.xJavaAGPL-3.0

使用Sql Server连接数据库时,提示Property 'dataSource' is required

Closed
无敌小蘑菇  Opened this issue

该问题是怎么引起的?

如题

重现步骤

连接代码
jdbc:
type: mssql
driver: net.sourceforge.jtds.jdbc.Driver
url: jdbc:jtds:sqlserver://xxx:xxx/xxx;instance=MySQLServer
username: sa
password: xxx
testSql: SELECT 1

报错信息

org.springframework.beans.factory.UnsatisfiedDependencyException: 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 [/Users/zouding/Downloads/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

6732_thinkgem total 3 participants

Comments (2)

6732_thinkgem
ThinkGem 2019-10-10 11:43 owner

检查yml文件格式,一般是文件yml格式有错误。

YANGDAESUNG 2019-10-12 13:09

jdbc:后面少了一个空格

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority

Help Search