Home > Back-end >  Mapper namespace attribute cannot resolve
Mapper namespace attribute cannot resolve

Time:05-12



Probably know is in the mouth of the dao, but look at the teaching video, directly write a mapper path, why I can't, is a version of the problem

CodePudding user response:

Namespace corresponding dao layer Interface, for example AccountDao, you introduce AccountMapper, certainly not, according to your screenshot, should be com. The account, and should be Interface instead of the Class

CodePudding user response:

Regular project path configuration dao layer interface for SRC/main/Java/com/dao/AccountDao. Java, is the interface type, namely public interface AccountDao
XML file should be SRC/main/Java/resources/mapper/AccountMapper. XML

CodePudding user response:

The contrast carefully again with the video, you see what is the difference between the two of you

CodePudding user response:

Didn't the Mapper interfaces under the namespace for the SRC fully qualified name
  • Related