<mapper namespace="com.example.demo.mapper.UserMapper"> namespace binds the interface UserMapper of the dao layer, defines methods in the interface to operate the database, but does not need to implement specific implementation, add sql statements to the corresponding Mapper file to implement
Database CRUD operations. Configure the configuration file of mybatis and the path of mapper in application.properties.
mybatis.config-location=classpath:mybatis/mybatis-config.xml
mybatis.mapper-locations=classpath:mybatis/mapper/UserMapper.xml
If this address is written incorrectly, an invalid bind exception will be reported. You need to carefully modify the path, including the file name , I can't identify it because I didn't add .xml when I created the xml file.