![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
iteye_5623
这个作者很懒,什么都没留下…
展开
-
hibernate多对多关联的一个问题
有这样两张表,部门和雇员需求:1 每个部门有多个雇员; 2 雇员只能同时属于一个部门; 3 雇员所属部门可以改变,但是需要保留部门变化的历史记录。我有点困惑,似乎应该使用双向多对多关联,但是这样的话我不知道怎么样才可以确定雇员当前的部门。或者还有什么更好的方案,多谢。...2007-03-31 11:14:34 · 56 阅读 · 0 评论 -
Spring的httpsession管理问题?
现在的有这样一个需求,有一个基于spring mvc的 web application,出于一些理由需要每一层的对象包括service, dao甚至 logger类都要能取到httpsession对象,不知道有什么好的方法?我现在想到的是用dependency injection把session对象注入到每个对象,但是显然不是个很好的设计,隐约记得spring里有个interceptor类实现...2008-10-17 23:15:39 · 171 阅读 · 0 评论 -
Velocity Sample
[code="java"]/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional informat...2009-04-15 00:37:36 · 119 阅读 · 0 评论 -
Dozer Sample
Configurable dozer converter:[code="java"]public class BalanceConverter implements ConfigurableCustomConverter { public Object convert(Object destinationFieldValue, Object sourceFieldValue,...2009-04-14 01:07:45 · 111 阅读 · 0 评论 -
Maven
[code="xml"] org.apache.maven.plugins maven-checkstyle-plugin 2.3 checkstyle.xml [/code][b]Maven and AN...2009-03-04 22:58:46 · 82 阅读 · 0 评论 -
Struts - menu permission
[code="xml"] ...2009-03-03 01:07:56 · 218 阅读 · 0 评论 -
Struts - Menu
[b]DisplayerMapping[/b][code="xml"]/* * MenuDisplayerMapping.java * * Created on February 6, 2001, 5:24 PM */package net.sf.navigator.displayer;import java.io.Serializable;/** ...2009-03-03 01:02:27 · 115 阅读 · 0 评论 -
Unit Testing
[b]Spring Annotation for Junit[/b][code="java"]@RunWith(SpringJUnit4ClassRunner.class)//specifies the Spring configuration to load for this test fixture@ContextConfiguration(locations={"/ser...2009-03-02 23:21:13 · 61 阅读 · 0 评论 -
Base Class Sample
[code="java"] protected final transient Log log = LogFactory.getLog(getClass());[/code][code="xml"] ...2009-02-28 12:54:49 · 90 阅读 · 0 评论 -
Spring request/session scope bean
Being able to define a bean scoped to a HTTP request or Session (or indeed a custom scope of your own devising) is all very well, but one of the main value-adds of the Spring IoC container is that it ...原创 2009-02-27 22:10:14 · 79 阅读 · 0 评论 -
hibernate 如何部分更新需要的字段而不是所有的?
比如created_user,created_time等字段,只在insert时有用,在用saveorupdate()更新时,pojo中没有值的字段hibernate 也会去更新,有没有办法让hibernate只更新需要的字段,其他的字段保持数据库原有值不变。...2007-04-11 09:22:56 · 190 阅读 · 0 评论 -
Maven configruation sample with codehaus and surefile
[code="xml"] 4.0.0 tools CodeGenerator 0.0.1-SNAPSHOT CodeGenerator org.apache.maven.plugins maven-compiler-plugin ${compileSource} ${compileSour...2009-07-19 22:46:00 · 87 阅读 · 0 评论