spring
hiskyrisa
这个作者很懒,什么都没留下…
展开
-
Exception:Spring3.2 AOP 事务管理
Spring的配置文件中,事务配置如下:<tx:advice id="txAdvice" transaction-manager="transactionManager"> <tx:attributes> <tx:method name="get*" read-only="true" /> <tx:me2013-03-22 19:33:14 · 112 阅读 · 0 评论 -
Exception:JSP用foreach迭代list时出错,页面解析出错
HTTP ERROR 500Problem accessing /mvc/student/getList. Reason: The class 'java.lang.String' does not have the property 'studentId'.Caused by:javax.el.PropertyNotFoundException: The cl...原创 2013-03-23 16:15:20 · 372 阅读 · 0 评论 -
Study:SpringMVC3.2处理ajax请求
jsp页面如下: <form id="myForm" method="post" action="/mvc/student/add"> <table> <tr> <td>姓名</td> <td><input id="原创 2013-03-25 22:30:29 · 164 阅读 · 0 评论 -
Study:SpringMVC整合Mybatis的完整例子
没时间贴代码了,直接上穿附件。原创 2013-03-27 19:16:37 · 66 阅读 · 0 评论 -
Study:Spring的单例是否只意味着能创建一个实例
<?xml version="1.0" encoding="UTF-8"?><!-- Bean头部 --><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:con原创 2013-06-13 19:02:22 · 1836 阅读 · 0 评论 -
Exception:文件导入的异常
负责排查一个导入功能的bug,debug找到的信息如下: 页面点击导入后,将上传的文件提到到一个controllerpublic ModelAndView importCSV( HttpServletRequest request, HttpServletResponse response ) throws Exception { s_logger.debug("impo...原创 2013-07-02 11:49:13 · 346 阅读 · 0 评论 -
Study:spring security简单例子
创建一个maven web项目,pom.xml<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://ma...原创 2014-12-12 11:08:13 · 90 阅读 · 0 评论 -
基于Annotation和AOP实现Service缓存方案
简单的使用缓存的方法,就是在Service中嵌入调用缓存的代码。1.先查询缓存,2.若缓存命中,则返回3.从数据库查询,并且往缓存中插入一份 这种做法导致许多许多重复代码,所以想到了用注解来调用缓存。并且在注解中设置key和expire先定义注解package com.cache;import java.lang.annotation.ElementType...原创 2018-06-12 16:31:52 · 187 阅读 · 0 评论