<if test="name != null">
只有Sting才有空字符串,不等于"",而数据和list和map是不等于null的;
如果mybatisConfig.xml里没有写xml配置,就会报Type interface Mapper is not known to the MapperRegistry.错误
<insert id="create" parameterType="User">
INSERT INTO [dbo].[user]
(
[user_name]
,[age]
,[password]
)
VALUES
(
#{userName}
,#{age}
,#{password}
)
</insert>