Pass a single String type parameter in mybatis
When using the mybatis interface parameter with only one string, if @Param is not specified, mybatis will default the parameterType parameter to the parameter type of the interface, and then call the get/set method of parameter a under the type for the #{a} parameter in xml. Reported wrong. Using the @Param annotation mybatis will assign a one-to-one correspondence without causing this error.
The interface is as follows:
The xml file is as follows:
The error is as follows:
Change it to the following:
Tags
Technical otaku
Sought technology together
0 Comments