當有多個Dao層的方法有參數時,在使用Mapper.xml文件時,會報識別不了參數的錯誤
解決方法,爲方法的每個參數添加一個@Param註解:
User getUserByNameAndPassword(@Param("userName") String userName, @Param("userPassword") String userPassword);
當有多個Dao層的方法有參數時,在使用Mapper.xml文件時,會報識別不了參數的錯誤
解決方法,爲方法的每個參數添加一個@Param註解:
User getUserByNameAndPassword(@Param("userName") String userName, @Param("userPassword") String userPassword);
1、 2、 3、 4、 5、 6、 7、運行 HelloWorld 啓動後內置的Tomcat服務器也同時啓動起來了,然後在瀏覽器中輸入 localhost:8080/hello