原创 用maven項目mybatis集成spring+springmvc無刷新實現crud

具體步奏 步驟1.下載 mybatis-spring插件或者添加maven依賴      <dependency>  <groupId>org.mybatis</groupId>  <artifactId>mybatis-sprin

原创 SpringMvc的消息驗證

web.xml的代碼 [html] view plain copy <?xml version="1.0" encoding="UTF-8"?>   <web-app version="2.5"        

原创 Spring的控制反轉

控制反轉的發展由來,是爲了把控制權從class文件中脫離,從而更少的編譯Java源文件。 1.main控制:運行簡單,操作容易。缺點必須修改源代碼來把握控制權 2.使用工廠模式:可以通過傳入的參數來確定創建哪個對象,創建大部分對象不需要修

原创 MyBatisGenerator的自動生成代碼之MyEclipse

api http://mbg.cndocs.tk/ MyEclipse用MyBatiesGenerator自動生成跟Eclipse不同,MyEclipse不能安裝MyBatiesGenerator插件 所以這裏我們可以參考http

原创 Mybatis用xml文件映射的增刪查改

新建一個maven項目 pom.xml需要添加的標籤: [html] view plain copy  <!-- 自動加載mybatis架包 -->      <dependency>     <group

原创 Mybatis的動態sql----where,trim,set,foreach

jdbc.properties [plain] view plain copy url=jdbc\:oracle\:thin\:@localhost\:1521\:orcl   driverClass=ora

原创 Mybatis的接口映射、接口的註解映射和自定義傳參

接口映射—————— 主配置文件mybatis.xml增加<mapper>標籤: [html] view plain copy <mappers>       <mapper resource="cn/et/

原创 struts2的struts.properties配置文件

struts.enable.DynamicMethodInvocation = truestruts.action.extension=action,,struts.devMode = true#scan from other packa

原创 Mybaities多對一註解和xml的實現

Dept實體類: [java] view plain copy package cn.et.mybatis.lesson03.manyToOne;   // default package         /** 

原创 Spring解決亂碼問題

需要在web.xml配置文件中配置一個字符集的過濾器 spring自帶的 [html] view plain copy <span style="white-space:pre">  </span><filter>  

原创 Mybatis的selectKey——xml映射和註解映射sql

jdbc.properties: [plain] view plain copy url=jdbc\:oracle\:thin\:@localhost\:1521\:orcl   driverClass=oracl

原创 struts2耦合和非耦合設置值和獲取的方式

/** * struts2的參數的 解耦合和耦合 * 耦合 藉助servletapi進行參數獲取 * 解耦合 使用struts2的方式獲取參數 * @author Administrator * * 有setAttrib

原创 Spring 發送郵件 (3) Spring使用模板Freemarker

環境   源碼分析 [java] view plain copy package com.macower.spring.jmail;         import java.io.IOException;   imp

原创 Jedis緩存實現類

pom.xml導入架包 [html] view plain copy <!-- 導入jedis架包 -->   <dependency>     <groupId>redis.clients</gro

原创 Mybatis查詢語句返回對象和泛型集合

EmpMapper映射接口: [java] view plain copy package cn.et.mybatis.lesson03;      import java.util.List;      impo