-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
SqlSessionFactoryBean single resource, using wildcard causes a IOException #792
Comments
Hi, |
Hi @sarswat001, sounds reasonable to assist users, feel free to raise PR for same and we can take a look at it. Thanks. |
Hi, |
Based on the stack the actual error is not on the setter, it's elsewhere so any adjustment would need done where it occurs, and I was thinking you intended to enhance the message not simply add a javadoc.
Where you put that currently violates javadocs linter. The setter does not throw anything nor would it as that violates bean spec. Please look to where issue actually pops and provide a better exception that will help users. Most would not read a stack and think javadocs would tell them how to solve. The stack message should tell them.
Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Sarswat Aryan ***@***.***>
Sent: Saturday, April 22, 2023 8:46:56 AM
To: mybatis/spring ***@***.***>
Cc: Jeremy Landis ***@***.***>; Comment ***@***.***>
Subject: Re: [mybatis/spring] SqlSessionFactoryBean single resource, using wildcard causes a IOException (Issue #792)
Hi,
Will this not get merged?
—
Reply to this email directly, view it on GitHub<#792 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAHODIZBDXA7KF2N5VB62UDXCPHMBANCNFSM6AAAAAAV6EJ36A>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I saw the setMapperLocations method comment in the SqlSessionFactoryBean class and set up Resource using wildcard, but the following exception occurred:
java.io.IOException: Failed to parse mapping resource: 'class path resource'
If you use the getResource() method that returns a single resource, an exception occurs when using wildcards.
The relevant test codes are as follows:
(I added this test code to the SqlSessionFactoryBeanTest class)
If you use `getResources()`, there are no exceptions when you use wildcard.
So, Why don't you add a description of this exception information in the comments of the setMapperLocations method?
And is it okay to add this test code?
The text was updated successfully, but these errors were encountered: