08 2017 档案
getCurrrentSession和openSession的区别,还有getHiberanteTemplate
摘要:getCurrrentSession和openSession的区别,还有getHiberanteTemplate 去网上查 JdbcTemplate去网上查 阅读全文
posted @ 2017-08-31 14:53 cyy_13 阅读(133) 评论(0) 推荐(0)
hibernate数据库扫描实体类的配置
摘要:在applicationContext中配置 配置文件中的两个红线框的部分是等价的,写哪一个都可以,都是扫描实体类的。 阅读全文
posted @ 2017-08-30 13:59 cyy_13 阅读(1389) 评论(0) 推荐(0)
ajax
摘要:ajax局部异步提交刷新,不支持整个表单的提交。 阅读全文
posted @ 2017-08-29 14:05 cyy_13 阅读(125) 评论(0) 推荐(0)
事务配置
摘要:手动配置事务: @Autowired private SessionFactory sessionFactory; Session session=sessionFactory.openSession(); Transaction tx=null; //先开启一个事务 tx=session.begi 阅读全文
posted @ 2017-08-28 17:19 cyy_13 阅读(143) 评论(0) 推荐(0)
参数绑定
摘要:参数绑定: Hibernate中对动态查询参数绑定提供了丰富的支持,那么什么是查询参数动态绑定呢?其实如果我们熟悉传统JDBC编程的话,我们就不难理解查询参数动态绑定,如下代码传统JDBC的参数绑定: PrepareStatement pre=connection.prepare(“select * 阅读全文
posted @ 2017-08-28 16:14 cyy_13 阅读(268) 评论(0) 推荐(0)
SQL语句查询执行
摘要:SQLQuery query = sessionFactory.getCurrentSession().createSQLQuery(hql);用getCurrentSession()执行不了SQL 如果用getCurrentSession()会报错:hibernate4不能转换为hibernate 阅读全文
posted @ 2017-08-28 15:39 cyy_13 阅读(202) 评论(0) 推荐(0)
bo、vo
摘要:bo:实体类 vo:condition、form 阅读全文
posted @ 2017-08-25 19:17 cyy_13 阅读(121) 评论(0) 推荐(0)
No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
摘要:解决办法 在web.xml中加入: <filter> <filter-name>SpringOpenSessionInViewFilter</filter-name> <filter-class>org.springframework.orm.hibernate4.support.OpenSessi 阅读全文
posted @ 2017-08-25 16:26 cyy_13 阅读(172) 评论(0) 推荐(0)
需要导入的包
摘要:ModelAndView需要导入的包org.springframework.web.servlet-3.1.0.RELEASE.jar SessionFactory类、Session类分别需要导入org.hibernate.SessionFactory;和org.hibernate.Session; 阅读全文
posted @ 2017-08-25 10:02 cyy_13 阅读(135) 评论(0) 推荐(0)
spring Controller类注解的包
摘要:@Controller需要导入org.springframework.web-3.1.0.RELEASE.jar @RequestMapping、@Service、@Repository需要导入org.springframework.context-3.1.0.RELEASE.jar @Autowi 阅读全文
posted @ 2017-08-23 18:34 cyy_13 阅读(912) 评论(0) 推荐(0)
<welcome-file-list>标签作用,怎样使用
摘要:就是制定首页比如你写的项目 地址是 127.0.0.1 里边有一个也页面 index.jsp如果要访问这个页面的话你要输入 127.0.0.1/index.jsp如果在 <welcome-file-list>里指定了index.jsp为首页的话 你只要输入 127.0.0.1 就能直接打开 inde 阅读全文
posted @ 2017-08-23 17:20 cyy_13 阅读(527) 评论(0) 推荐(0)
jsp页面开始报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
摘要:http://jingyan.baidu.com/article/f79b7cb34f40569144023ef9.html 我们遇到的错误显示如下: 我们遇到的错误显示如下: 我们右击有错误提示的文件夹,如下: 我们右击有错误提示的文件夹,如下: 我们点击”配置构建路径“,如下: 我们点击”配置构 阅读全文
posted @ 2017-08-23 17:17 cyy_13 阅读(172) 评论(0) 推荐(0)
eclipse建web工程的dynamic web module version 具体是什么意思
摘要:java的web系统有多种类型,比如静态的和动态的,然后动态的java web project要设置dynamic web module,也就是动态网页模型,他必须要喝对应的服务器搭配好了才能跑,今天看见的问题就是dynamic web module 2.4 对应Tomcat 5.5dynamic 阅读全文
posted @ 2017-08-23 16:01 cyy_13 阅读(1700) 评论(0) 推荐(0)
配置文件报错:cvc-complex-type.2.4.a: Invalid content was found starting with element filter
摘要:配置文件filter元素报错解决办法:解决办法为:将“http://www.springmodules.org/schema/cache/springmodules-cache.xsd http://www.springmodules.org/schema/cache/springmodules-e 阅读全文
posted @ 2017-08-23 12:08 cyy_13 阅读(1169) 评论(0) 推荐(0)
启动Tomcat报错:NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException
摘要:缺少aspectjweaver.jar这个包,该包是spring集成AspectJ LTW织入器所需包。 阅读全文
posted @ 2017-08-23 10:33 cyy_13 阅读(256) 评论(0) 推荐(0)
Spring3 报org.aopalliance.intercept.MethodInterceptor问题解决方法
摘要:一 开发环境:JDK5+Spring3.0.5+Myeclipse6.6+Tomcat6 二 启动报错如下: 1 Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [htt 阅读全文
posted @ 2017-08-23 10:28 cyy_13 阅读(139) 评论(0) 推荐(0)
报错
摘要:忘记写了一个双引号和半个括号,报错String literal is not properly closed by a double quote字符串文本不正确关闭的双引号 Tomcat启动报错:ApplicationEventMulticaster not initialized call 're 阅读全文
posted @ 2017-08-22 18:19 cyy_13 阅读(142) 评论(0) 推荐(0)
spring-servlert.xml配置报错
摘要:spring servlet.xml配置中报错: The prefix "tx" for element "tx:advice" is not bound 解决办法: 在配置文件中加:xmlns:aop="http://www.springframework.org/schema/aop" xmln 阅读全文
posted @ 2017-08-22 15:17 cyy_13 阅读(463) 评论(0) 推荐(0)
PLSQL表乱码
摘要:更改系统环境变量 我的电脑 右击 属性 高级系统设置 环境变量 系统变量 新建 变量名:NLS_LANG,变量值:SIMPLIFIED CHINESE_CHINA.ZHS16GBK,确定,重启plsql,即可。 阅读全文
posted @ 2017-08-22 12:14 cyy_13 阅读(175) 评论(0) 推荐(0)
hibernate注解的包
摘要:hibernate实体类的注解Entity和Table、Id、Column、GeneratedValue引入的是javax.persistence.Entity;和javax.persistence.Table等;而不是org.hibernate.annotations.Entity;和org.hi 阅读全文
posted @ 2017-08-21 16:37 cyy_13 阅读(523) 评论(0) 推荐(0)
Spring的refresh()方法相关异常
摘要:如果是经常使用Spring,特别有自己新建ApplicationContext对象的经历的人,肯定见过这么几条异常消息: 1.LifecycleProcessor not initialized call 'refresh' before invoking lifecycle methods via 阅读全文
posted @ 2017-08-21 11:08 cyy_13 阅读(228) 评论(0) 推荐(0)
spring3.1.1的各个jar作用
摘要:最近开始深入学习spring了解到的一些spring知识分享给大家看看。 org.springframework.aop 3.1.1.RELEASE.jar spring 的面向切面编程,提供AOP(面向切面编程)实现, org.springframework.asm 3.1.1.RELEASE.j 阅读全文
posted @ 2017-08-21 11:07 cyy_13 阅读(146) 评论(0) 推荐(0)
Java中各jar的作用
摘要:jta.jar 标准JTA API必要 commons collections.jar 集合类 必要 antlr.jar ANother Tool for Language Recognition 必要 asm.jar ASM字节码库 如果使用“cglib” 则必要 asm attrs.jar AS 阅读全文
posted @ 2017-08-21 11:06 cyy_13 阅读(1622) 评论(0) 推荐(0)
String path = request.getContextPath(....拼装当前网页的相对路径
摘要:<% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; % 阅读全文
posted @ 2017-08-21 08:51 cyy_13 阅读(151) 评论(0) 推荐(0)
<meta http-equiv="pragma" content="no-cache">
摘要:pragma与no cache 属性值 定义页面缓存 pragma与no cache用于定义页面缓存 pragma出现在http equiv属性中,使用content属性的no cache值表示是否缓存网页 引用网址:http://www.dreamdu.com/xhtml/no cache/ 不缓 阅读全文
posted @ 2017-08-21 08:45 cyy_13 阅读(3196) 评论(0) 推荐(0)