原创 java底層對象的創建過程
1對象的創建過程 源碼: class T{ int m=9; } T t=new T(); T t=new T();的彙編碼: 0 new #2 <T> //半初始化 確定具體內存大小 m的值初始爲0 3 dup
原创 SpringMVC請求參數獲取的方法
通過@PathVariabl註解獲取路徑中傳遞參數JAVA @RequestMapping(value = "/{id}/{str}") public ModelAndView helloWorld(@PathVariable Str
原创 NHibernate之異常處理
1.Could not compile the mapping document: *.hbm.xml 可能是因爲類沒有配置全名 解決方法:在class的name裏面配置全名 <class name="OA.Model.M
原创 mvc後臺校驗 通過打標籤的方式
public int Id { get; set; } [Required(ErrorMessage = "*")] [StringLength(5,ErrorMessage="超過長度
原创 SpringMVC測試@Test
@RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration({"classpath*:applicationContext.xml"}) public cla
原创 jsp中json對象的遍歷
$(document).ready(function() { $("#Link").click(function() { var objson = "[{Title:'Sjr',Content
原创 SpringMVC中文亂碼的解決及配置
SpringMVC中文亂碼的解決及配置 在用spring開發時,難免會遇到亂碼問題,在Spring中的解決方法如下: 雖然表示層的頁面都是JSP實現,JSP中的編碼格式都採用UTF-8,但是中文亂碼還是出現了,不過用SpringMV
原创 JAVA1.8stream demo
package com.hj.test.stream; import com.alibaba.fastjson.JSONObject; import com.hj.test.bean.Person; import java.util
原创 spring多線程demo
controller控制器 @RestController @RequestMapping("/test") public class TestController implements ApplicationContextAware
原创 隱式按鈕點擊庫例子
隱式的按鈕點擊庫 $("#input[btn-click]").click(function(){ var strFun=$(this).attr("btn-click"); eval(strFun+"()");
原创 全路徑,ispostback,無狀態http,Cookie,xss漏洞
讀取項目下的html文件,要用全路徑讀取, 方法爲 string fullpath=context.Server.MapPath(“hello.html”); File.ReadAllText(fullpath) isp
原创 response
響應的緩衝輸出,爲了提高服務器的性能。ASP.NET向瀏覽器write的時候,並不會沒write一次都會立即輸出到瀏覽器,而是會緩存數據,到適合的時機或者響應結束的時候纔會將緩衝區中的數據一起寫入到瀏覽器中。 response的
原创 詳解Hibernate Session & Transaction
詳解Hibernate Session & Transaction 2011-04-06 19:32:27| 分類: JavaEE | 標籤:session 線程 hibernate 實例 transaction
原创 Repeater
Repeater(foreach)用於對綁定的數據源中的數據進行遍歷顯示。重點內容 每一條數據以什麼格式顯示有Repeater的來決定。模板會多次顯示 姓名:<%#Eval(“name”)%>年齡:<%#Eval(“age”)%
原创 文件上傳
前臺 <form id="frm" action="/Ajax/processImgUpload" enctype="multipart/form-data" method=