原创 三目運算符運算順序
public class Test { public static void main(String[] args) { Object o1=true? new Integer(1): new D
原创 IDEA springmvc web.xml中org.springframework.web.servlet.DispatcherServlet報錯
根據目錄File--->Project Structure---->Modules------>Dependencies 選擇Tomcat---> Add Selected即可。
原创 Java比較簡單的幾種排序算法
1.快速排序的其中一種方式挖坑法 public class SortMethod { public static void main(String[] args) { int[] a={42,91,33,51,40,39,56
原创 js圖片轉base64字符串格式上傳
選擇文件,回顯圖片以及轉base64格式後字符串隱藏提交文本域 <div class="col-sm-8 contain_img"> <img src="" style="display: none"></img> <input
原创 獲取項目在Tomcat中的路徑問題,以及創建HttpServletRequest獲取session數據。
1.沒有請求的獲取該類所在tomcat下的路徑 String path=this.getClass().getResource("/").getPath(); 2.通過發送請求的HttpServletRequest獲取項目在Tomcat中
原创 easyUI中tree的默認加載子節點動態加載field
$(document).ready(function() { $('#comboboxtree').tree({ /* 發送請求*/ url : 'comboboxtree?', onLoadSu
原创 EasyUI中實時監控input輸入框信息
界面文本框,輸入起始,和結束信息,實時監控輸入的內容,並且可以加入,邏輯方法去實時改變其他輸入框的信息。 <tr> <td class="field-title">起始:</td> <
原创 Spring的@Autowired註解、@Resource註解和@Service註解
什麼是註解 傳統的Spring做法是使用.xml文件來對bean進行注入或者是配置aop、事物,這麼做有兩個缺點: 1、如果所有的內容都配置在.xml文件中,那麼.xml文件將會十分龐大;如果按需求分開.xml文件,那麼.xml文件又會非
原创 導入excel文件
1-前端框架EasyUI,導入彈出框樣式 <!--導入彈出框 --> <div id="imp" class="easyui-dialog" data-options="modal:true" title="導入" style=
原创 web.xml文件
web.xml文件用來初始化配置信息:比如Welcome頁面、servlet、servlet-mapping、filter、listener、啓動加載級別等。 每個xml文件都有定義它書寫規則的Schema文件,也就是說javaEE的
原创 5+2隨機不重複號碼
每天給自己一點夢想。 public static void SupperLotto() { int min=1; int max=35; int max2=12; Random random = new Ra
原创 導出excel格式文件
1-在controller中向exportExcelz方法中傳入3個參數需要,導出的集合,導出的文件名,HttpServletResponse請求參數 2-導出excel文件的靜態方法:對不同的需求有不同的寫法,刪除那些花裏胡哨就可以了。
原创 獲取項目在Tomcat中的路徑問題,以及獲取session數據。
1.沒有請求的獲取該類所在tomcat下的路徑 String path=this.getClass().getResource("/").getPath(); 2.通過發送請求的HttpServletRequest獲取項目在Tomcat中
原创 springMVC後臺向前臺傳參數
後臺通過model添加一個需要傳的參數或Object @RequestMapping("/getError") public String getError(Model model){ model.addA
原创 oracle新建觸發器設置id自增序列
新建觸發器PLSQL中Triggers查看 create or replace trigger TRIGGER_BASE_CUSTOMER --觸發器名 before insert on BASE_CUSTOMER --表名 for ea