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

Unexpected warning "No MyBatis mapper was found in '[....]' package" #1015

Open
FrVaBe opened this issue Oct 4, 2024 · 0 comments
Open

Unexpected warning "No MyBatis mapper was found in '[....]' package" #1015

FrVaBe opened this issue Oct 4, 2024 · 0 comments

Comments

@FrVaBe
Copy link

FrVaBe commented Oct 4, 2024

I am running an application with mybatis-spring-boot-starter version 3.0.3, mybatis-spring 3.04 and mybatis version 3.5.16.

On startup I get an error warning No MyBatis mapper was found in '[....]' package" which is unexpected for me. It is true that I have not defined any mapper classes because I have defined all mappings via XML configuration files. And I make these files available via the mybatis.mapper-locations=/mapperXml/*_Mapper.xml configuration. Everything works fine, thus no need to print a warning here.

The warning message probably comes from the ClassPathMapperScanner.

I wonder if I can suppress the warning. There is a method setPrintWarnLogIfNotFoundMappers but no configuration property in the mybatis-spring-boot-starter to set the value (at least I did not found any).

I would appreciate it if the warning was not displayed (as the mapper files are not necessary) or if this warning could at least be suppressed. However, I don't see this as a bug but rather as a minor improvement.

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

1 participant