總結

<select id="findByName" parameterType="String" resultType="com.risen.lifei.entity.Student">

select stuid,stuname,age,sex,password from student where stuname=#{stuname,jdbcType=VARCHAR}

</select>

mybatis如何將頁面上的字段string類型的和數據庫中varchar類型的作比較

data類型轉string有投string方法,string轉data:

DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd");            
            String s = "1987-10-10";
            Date date = fmt.parse(s);
            System.out.println(fmt.format(date));


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章