Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jdbc-demo的db配置有问题 #1

Open
honestAnt opened this issue Mar 2, 2018 · 3 comments
Open

jdbc-demo的db配置有问题 #1

honestAnt opened this issue Mar 2, 2018 · 3 comments

Comments

@honestAnt
Copy link

问题:jdbc版本的demo代码配置有问题;
问题描述:
1.applicationContext_db_mysql.xml中的lcnDataSourceProxy对象中并没有对应的dataSource成员变量,强制赋值,容器启动会提示(org.springframework.beans.NotWritablePropertyException: Invalid property 'dataSource' of bean class [com.codingapi.tx.datasource.relational.LCNTransactionDataSource]: Bean property 'dataSource' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?)
2.jdbcTemplate的dataSource成员变量赋值类型有问题,启动提示(java.lang.IllegalStateException: Cannot convert value of type 'com.codingapi.tx.datasource.relational.LCNTransactionDataSource' to required type 'javax.sql.DataSource' for property 'dataSource': no matching editors or conversion strategy found)

开发工具:intellij idea
开发环境:windows7
jdk版本:1.8

@xlorne
Copy link
Contributor

xlorne commented Mar 2, 2018

您是用的是什么版本的,需要确保TxClient与TxManager的版本都一直

@honestAnt
Copy link
Author

你好,txclient和txmanager是4.1.0的版本;

@iCodingStar
Copy link

遇到了相同的问题,对于初用者,这样的更新太不友好了吧。Demo版本升级了,但是文档并没有升级,希望快点修正。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants