Home > Back-end >  Springboot use generic mapper strange bug, after meet, every brother for help
Springboot use generic mapper strange bug, after meet, every brother for help

Time:09-23

Start the class configuration mapperscan annotation


Application. Yml configuration mapper - locations


If two configuration at the same time, can lead to some bean can't create


If the mapper can create bean - locations commented, but cannot scan to custom mapper


Only configure mapper - locations for scanning the specified custom mapper, two kinds of bugs won't appear, why?

CodePudding user response:

Is two different configuration, a package is mapper interfaces specified paths, one is the designated mapper. The path of the XML

CodePudding user response:

Try to: mapper - locations: the classpath * :/mapper/*. XML

CodePudding user response:

Remove the mapperscan, add annotations on the corresponding mapper file @ mapper try
  • Related