- 浏览: 4020 次
- 性别:
最新评论
文章列表
jdbc.properties
db.username=root
db.password=root
db.driverClassName=com.mysql.jdbc.Driver
db.url=jdbc:mysql://localhost:3306/mybatis?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF-8
mybatis-config.xml
<?xml version="1.0" encoding="UTF-8" ...
dao层
public interface IUserDao extends CrudRepository<User, Long>,JpaRepository<User, Long>,PagingAndSortingRepository<User,Long>{
}
persistence.xml
<?xml version="1.0"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi=&quo ...
// 测试环境
/*$(function(){
alert($===jQuery);
$.messager.alert('提示','内容');
});*/
var editing; //判断用户是否处于编辑状态
$(function(){
$("#mydatagrid").datagrid({
title:'用户列表',
width:500,
height:'auto',
pagination:true,
pageList:[5,10,15,20],
pageNumber:2,
pageSize:10,
idField ...
// 测试环境
/*$(function(){
alert($===jQuery);
$.messager.alert('提示','内容')
});*/
$(function(){
$("#mydatagrid").datagrid({
title:'用户列表',
width:500,
height:'auto',
idField:'id',
fitColumns:true,
loadMsg:'正在加载数据,请稍等........',
pagination:true,
pageSize:10 ...
FreemarkerUtil.java
public class FreemarkerUtil {
// 获得template对象
public Template getTemplate(String name){
try {
// 通过Configuration 对象读取相应的ftl文件
Configuration config=new Configuration();
// 设置flt文件目录
config.setClassForTemplateLoading(this.getClass(),"/cn/itcast/freemarke ...
public class MongoTest {
@BeforeClass
public static void setUpBeforeClass() throws Exception {
}
// 查询所有
@Test public void list()throws Exception{
// 连接客户端
Mongo mongo=new Mongo("localhost",27017);
// 获得数据库
DB db=mongo.getDB("test1");
// 获得文档对象
DBCollection dbCo ...
具体的使用方法推荐大家查看:http://www.59biye.com/mongodb/cont/pid/284/id/310.shtml
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.spr ...