摘要: 已经有1年没有使用hibernate了,公司已经基本转到mybatis,一直很怀念当年hibernate通用泛型Dao的方式,只需要写好sql设置好返回的object,现在感觉mybatis这方面我还是太弱小。先定义个接口package com.fangj.core.platform.common;... 阅读全文
posted @ 2014-07-02 15:12 方坚.cn 阅读(437) 评论(2) 推荐(0) 编辑
摘要: 以上是工程文件,下面开始测试package test.testservice;import org.junit.Test;import org.junit.runner.RunWith;import org.springframework.beans.factory.annotation.Autow... 阅读全文
posted @ 2014-07-02 14:56 方坚.cn 阅读(969) 评论(0) 推荐(0) 编辑
摘要: service接口package com.fangjian.core.platform.service;import com.fangjian.core.platform.po.User;public interface UserService { void saveUser(User use... 阅读全文
posted @ 2014-07-02 14:51 方坚.cn 阅读(886) 评论(0) 推荐(0) 编辑
摘要: jdbc.properties#hibernate settings hibernate.show_sql=truehibernate.format_sql=truehibernate.cache.use_query_cache=truehibernate.cache.provider_class=... 阅读全文
posted @ 2014-07-02 14:47 方坚.cn 阅读(960) 评论(0) 推荐(0) 编辑
摘要: json_test login.jsp contextConfigLocation classpath:com/config/spring/spring-*.xml org.springframework.web.conte... 阅读全文
posted @ 2014-07-02 14:44 方坚.cn 阅读(4752) 评论(2) 推荐(2) 编辑