標籤:最近接觸了一個類似於代碼產生工具的活。思路是,通過java的反射機製得到類的欄位和欄位類型,從而可以建立一個map集合儲存表名(由類名決定的特殊結構字串),表欄位(由類變數確定),表欄位類型(由變數類型確定),DAO中通過將map傳遞給mybatis,在mybatis 中調用預存程序產生表。1,在資料庫中添加一個預存程序,如下sp_createTableBEGIN DECLARE sql_text VARCHAR(2000); DROP TABLE IF
java.lang.SecurityException: Filter of class org.apache.catalina.ssi.SSIFilter is privileged and cannot be loaded by this web application,privileged錯誤: 1 java.lang.SecurityException: Filter of class org.apache.catalina.ssi.SSIFilter is privileged
Java虛擬機器記憶體管理原理基礎入門,java虛擬機器Jdk:Java程式設計語言、Java虛擬機器、Java API類庫。Jdk是用於支援Java程式開發的最小環境。Jre:Java API類庫中的Java SE API子集、Java虛擬機器。Jre是支援Java程式啟動並執行標準環境。new記憶體劃分方法:指標碰撞(堆記憶體規整,通過移動指標分配記憶體)、空閑列表(堆記憶體不規整,通過更新記憶體列表分配記憶體)。TLAB(Thread Local Allocation
LeetCode,leetcodeoj題目:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree and sum = 22, 5 / \ 4 8 / / \
從頭認識java-15.7 Map(4)-介紹HashMap的工作原理-hash碰撞(經常作為面試題)這一章節我們來討論一下hash碰撞。1.什麼是hash碰撞?就是兩個對象的key的hashcode是一樣的,這個時候怎麼get他的value呢?答案是通過equals遍曆table那個位置上面的Entry鏈表。 2.例子正常的例子: package com.ray.ch14;import java.util.HashMap;public class Test {public
LeetCode,leetcodeoj題目:Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note:Given m, n satisfy the following
LeetCode,leetcodeoj題目:Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2].Note: Recursive solution is trivial, could you do it
LeetCode,leetcodeoj題目:Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation of s1 = "great": great / \ gr eat / \ / \g r e at