Java開發中遇到的問題——持續總結(3)

1.mysql 刪除語句使用別名時出錯,還需要在DELETE FROM之間添加別名

DELETE 別名 FROM 表名稱 別名 WHERE 列名稱 = 值

2.session過期跳轉到登錄頁面並跳出iframe

<script type="text/javascript">
    if (window != top) {
        top.location.href = location.href;
    }
</script>  

或者filter中

    java.io.PrintWriter out = response.getWriter();  
    out.println("<html>");  
    out.println("<script>");  
    out.println("window.open ('/portal.jsp','_top')");  
    out.println("</script>");  
    out.println("</html>");  
    return;

3.HttpMessageNotReadableException 異常解決

InvalidFormatException: Can not deserialize value of type java.util.Date

解決辦法:https://blog.csdn.net/tiankongzhichenglyf/article/details/90599109

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