Spring抽象bean abstract=true宣言
1948 ワード
// ( )
public class FooDao {
private DataSource dataSource;
private SomeHelper someHelper;
private FooHelper fooHelper;
//setters
}
public class BarDao {
private DataSource dataSource;
private SomeHelper someHelper;
private BarHelper barHelper;
//setters
}
//xml bean( bean)
// Dao
public abstract Dao {
protected DataSource dataSource;
protected SomeHelper someHelper;
//setters
}
//
public class FooDao extends Dao {
private FooHelper fooHelper;
//setters
}
public class BarDao extends Dao {
private BarHelper barHelper;
//setters
}