-
Notifications
You must be signed in to change notification settings - Fork 713
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
springboot多数据源配置启动一直报这个错啊,请问时怎么回事? #15
Comments
你看看你是不是没有注入sqlSessionFactory 和 sqlSessionTemplate。或者没有写@bean注解。另外还有可能是你注入这两个的时候没有指定名字。发自我的华为手机-------- 原始邮件 --------主题:[yidao620c/SpringBootBucket] springboot多数据源配置启动一直报这个错啊,请问时怎么回事? (#15)发件人:wccJava 收件人:yidao620c/SpringBootBucket 抄送:Subscribed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userMapper' defined in file [D:\IDEA\idea2019\springboot\springboot-datasource\target\classes\com\spring\datasource\mapper\UserMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.
|
@lzyqssn 感谢您的回答!我仔细看了demo发现并没有对这两点进行注入,如果注入,请问如何注入? |
提供一下你的代码看看。
…------------------ 原始邮件 ------------------
发件人: "wccJava"<notifications@github.com>;
发送时间: 2019年6月5日(星期三) 晚上8:00
收件人: "yidao620c/SpringBootBucket"<SpringBootBucket@noreply.github.com>;
抄送: "1097842122"<1097842122@qq.com>;"Mention"<mention@noreply.github.com>;
主题: Re: [yidao620c/SpringBootBucket] springboot多数据源配置启动一直报这个错啊,请问时怎么回事? (#15)
@lzyqssn 感谢您的回答!我仔细看了demo发现并没有对这两点进行注入,如果注入,请问如何注入?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@lzyqssn 我明天把工程打包发您邮件,如果您有空可以帮我看看!感谢! |
@lzyqssn 您好我已经发送demo到您的邮箱上了,您有空可以的话指点一下!谢谢! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userMapper' defined in file [D:\IDEA\idea2019\springboot\springboot-datasource\target\classes\com\spring\datasource\mapper\UserMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
The text was updated successfully, but these errors were encountered: