I'm develop some Spring boot applications accessing DB using Mybatis starter.
I'm trying to split xml mapper files to external location like project root (when dev env), or jar-located directory (when prod env).
I change some options on application.properties like mybatis.mapper-locations to
- ./mappers/**/*.xml
- file:///./mappers/**/*.xml
But these relative directory settings didn't work. And absolute directory is works.
- file:///full/paths/to/project/mappers/**/*.xml
But I want to run with relative path. Because once set it relative, no need to change directory settings every deploy path changes!
There's no way to resolve this issue?
- I test the classpath setting, It didn't work and It looks not clean way...