- 浏览: 339008 次
- 性别:
- 来自: 北京
最新评论
-
孙艳霞111:
java.lang.IllegalStateException: Argument [RedirectAttributes] is of type Model -
llnyxxzj:
如果问题未解决可以看看http://blog.360chwl. ...
Caused by: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bea -
u013810758:
楼主求帮助类 ReflectionUtils,Hibernat ...
BaseDao可以这样设计 -
rankx:
你好,楼主可否发一份 ReflectionUtils,Hibe ...
BaseDao可以这样设计
文章列表
来源:
http://blog.163.com/yvette1114@126/blog/static/134178214201121495259172/
设计了两个表worker和email。一个worker对应多个email。
【问题】在jsp显示worker的emails时,写了以下:
<td>
<c:forEach items="emaillist" var="item">
<c:out value="${item.emailaddress}"></c ...
public interface INode<T>{
//返回节点ID
public String getNodeId();
//返回父节点ID
public String getParentId();
//返回节点名称
public String getTitle();
//往节点中添加子节点
public void addChild(INode<T> child);
//往节点中批量添加子节点
public void addChildren(Collection< ...
先将其注掉。@Controller
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/spring-mvc.xml]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean ...
解决:等号后面没有相应的名字
String hql= "from EnrChange t where t.enrStudentInfo.fid=:fid and t.fisRemove=";
Map<String,Object> filter = new HashMap<String,Object>();
filter.put("fid", fid);
filter.put("fisRemove", BigDecimal.valueOf(0));
异常状态:
line 1:99: une ...
@ManyToOne
@JoinColumn(name="FPRJ_CODE")
public Project getProject() {
return this.project;
}
public void setProject(Project project) {
this.project = project;
}
解决:action里的@Resource(name = "excelOperator")找不到excelOperator
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exampleAction': Injection of resource dependencies failed; nested exception is org.springframework.beans.facto ...
org.hibernate.QueryException: could not resolve property: sysMajor.fname of: com.ambow.lmsx.enrollment.entity.EnrStudentInfo
at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:81)
at org.hibernate.persister.entity.AbstractPropertyMapping.t ...
来源:http://michaelfly.iteye.com/blog/772514
今天在做一个功能的时候
遇到了。一个Could not resolve property 的问题。
配置文件如下:
Java代码
<many-to-one name="user" class="Users" column="StudentExam_user_fid" cascade="all" ></many-to-one>
<many-to-one name=& ...
http://hi.baidu.com/victorlin23/blog/item/8b7a3382670cd9b16d811963.html
Find()方法下FetchType.LAZY、FetchType.EAGER、@Fetch(FetchMode.JOIN)的区别2010-08-27 16:13结论:1.使用
例如:@ManyToOne(fetch = FetchType.LAZY)将会产生N+1的问题。
2.使用:@ManyToOne(fetch = FetchType.EAGER)将会使用join查询,推断hibernate对eaer进行了优化并不会产生N+ ...
jsp页面日期格式化
- 博客分类:
- web前端
<%@ taglib prefix="format" uri="http://java.sun.com/jsp/jstl/fmt" %>
<format:formatDate value="${enrChange.fchaDate}" pattern="yyyy年MM月dd日"/>
@InitBinder 用法
- 博客分类:
- java
来源:[url]
http://yeak2001.iteye.com/blog/465325
[/url]
@Controller
public class MyFormController {
@InitBinder
public void initBinder(WebDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
dateFormat.setL ...
IBaseService可以这样设计
- 博客分类:
- java
package org.ks4j.orm.hibernate;
import java.util.List;
import java.util.Map;
import org.ks4j.orm.Compositor;
import org.ks4j.orm.Filtration;
import org.ks4j.orm.PageData;
public interface IBaseService<T> {
/**
* 新增对象.
*/
public void save(T entity);
/**
* 修改对象.
...
BaseDao可以这样设计
- 博客分类:
- java
package org.ks4j.orm.hibernate;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.persistence.MappedSuperclass;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
impo ...
HibernateUtils可以这样设计
- 博客分类:
- java
package org.ks4j.utils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.criterion.CriteriaSpecification;
import org.hibernate.criterion.Criterion;
impo ...