본문 바로가기

스프링에서 Multi DataSource 사용 Spring-2.5.6 에서 여러개의 DataSource를 사용하는 방법을 소개한다. 다음과 같이 두개의 데이터 소스가 선언되어 있을 때 자동 주입(Inject)하고자 한다면 첫번째 @Resource annotation을 사용할 수 있다. @Resource(name = "riDataSource") public void setDataSource(DataSource dataSource) { super.buildSqlMapClient(dataSource); } 두번째 방법은 @Autowired와 @Qualifier 를 사용하는 방법이다. @Autowired public void setDataSource(@Qualifier("riDataSource") DataSource dataSource) { super.bu.. 더보기
우분투(2.2.14-5ubuntu8) apt-get install apahce2 설치 오류 해결방안 우분투 서버 10.04 설치후 sudo apt-get update sudo apt-get upgrade 를 실행한 다음 sudo apt-get install apache2 를 실행하면 아파치가 정상적으로 설치되지 않고 다음과 같은 에러를 보여준다. nextree@nextree:/etc/apache2$ sudo apt-get -f install apache2.2-common 패키지 목록을 읽는 중입니다... 완료 의존성 트리를 만드는 중입니다 상태 정보를 읽는 중입니다... 완료 제안하는 패키지: apache2-doc apache2-suexec apache2-suexec-custom 다음 새 패키지를 설치할 것입니다: apache2.2-common 0개 업그레이드, 1개 새로 설치, 0개 지우기 및 0개 .. 더보기
org.hibernate.AnnotationException: referencedColumnNames(columnName) of ... referencing ... not mapped to a single property org.hibernate.AnnotationException: referencedColumnNames(columnName) of A... referencing B... not mapped to a single property at org.hibernate.cfg.BinderHelper.createSyntheticPropertyReference(BinderHelper.java:180) at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:88) at org.hibernate.cfg.AnnotationConfiguration.processEndOfQueue(AnnotationConfiguration.java:456) at org.. 더보기