[exceptions] mybatis throws an exception, Caused by: java.io.IOException: Stream closed

Problem description: I encountered a problem when configuring multiple data sources in development. I used the same configuration file when configuring multiple SqlSessionFactory, and this exception was thrown in the second place where the configuration file was read.


The second reader here is actually closed inside the build method, so a new reader is needed to get the configuration file again

Solution
Read the configuration file again

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325819025&siteId=291194637