mybatis 專案中遇到的一些問題 注意事項

2021-06-17 21:50:43 字數 1113 閱讀 9161

對於更改了xml檔案,都要重啟伺服器才會生效,和註解一下..有更新註解的話.如webservice一定要重啟才會生效..

用begin end 語句批量更新或插入資料時. 不要忘記了把分號忘記了.今天遇到就是由於少了乙個分號而導致操作錯誤的事情.找一半天原因..

對於mybatis對映檔案寫sql的時候,最好要sqlplus測試一下..格式一定要統一,良好.跟slplus裡寫應該是一樣的..經常專案中都會發現由於多乙個,或少乙個逗號或分號等而導致重啟tomcat等伺服器的情況..從而浪費時間..因此建議,要有統一的格式:如下:我個人用的格式:

<

select

id

="dynamiciftest"

parametertype

="blog"

resulttype

="blog"

>

select  t.user,t.password,t.title,t.content,t.owner

from  t_blog  t

where 1

= 1   

<

iftest

="title != null"

>

and t.title

= #   

if>

<

iftest

="content != null"

>

and t.content

= #   

if>

<

iftest

="owner != null"

>

and t.owner

= #   

if>

select

>

在專案中遇到的一些bug

elemetn ui 版本 2.4.6 問題 在ie中日期時間選擇器不顯示初始化的資料,在chrome中正常顯示 原因 後端返回的資料 2019 02 15t16 00 00.000 0000 在chrome用new date 2019 02 15t16 00 00.000 0000 可以得到準確的...

在專案中遇到的一些bug

elemetn ui 版本 2.4.6 問題 在ie中日期時間選擇器不顯示初始化的資料,在chrome中正常顯示 原因 後端返回的資料 2019 02 15t16 00 00.000 0000 在chrome用new date 2019 02 15t16 00 00.000 0000 可以得到準確的...

在專案中遇到的一些bug

elemetn ui 版本 2.4.6 問題 在ie中日期時間選擇器不顯示初始化的資料,在chrome中正常顯示 原因 後端返回的資料 2019 02 15t16 00 00.000 0000 在chrome用new date 2019 02 15t16 00 00.000 0000 可以得到準確的...