본문 바로가기

백엔드

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-operation (NOP) logger implementationSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. jxls 라이브러리를 사용하면성 기존에 있던 log4j와 jxls에서 사용하는 slf4j가 충돌아닌 충돌이 나더라... 로그에 나온 링크로 가보면 저렇게 써 있을 뿐 정확한 안내는 없다. (실은 저게 정확할 수도..?) 라이브러리 로드 순서도 영향이 있을까 싶어 아래처럼 pom.xml 을 수정하니 정상적으로 로그가 출력된다. org.slf..
Eclipse Build Path Nesting Errors.. Maven error 이런 에러가 발생 했을 경우.. to enable the nesting exclude '......./' from ~~~ pom.xml 에 아래 태그를 삭제한다. src 해결..
[jUnit] Spring 3.2.3 + myBatis 3.2 Test suite 적용. 현재 작업하고 있는 프로젝트의 모든 프레임워크를 최신버전으로 세팅을 하고 서비스 클래스를 jUnit으로 작성해보았다... Maven jUnit dependency junit junit 4.7 test Maven Spring framework test org.springframework org.springframework.test 3.2.3.RELEASE AbstractApplicationContextTest.java package com.openerp.service.test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.contex..
Security 3.1.4 - Method 'setLoginFormUrl' is marked deprecated Security 3.1.4를 사용하면서 LoginUrl 설정을 하면서 아래와 같은 워닝을 보았다.. 확인해 본 결과 아래와 같이 변경 되었다.. org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint.setLoginFormUrl(String) use constructor injection 그러므로 아래와 같이 변경해준다.. 아래는 deprecated 된 항목을 살펴볼 수 있는 URL. http://static.springsource.org/spring-security/site/docs/3.1.x/apidocs/deprecated-list.html
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V 이런 에러가 나는데... SLF4J와 Spring Context 가 가지고 있는 slf4j 가 충돌이 나서 그런거므로 maven 설정을 아래와 같이.. org.springframework org.springframework.spring-library libd 3.2.3.RELEASE javax.servlet com.springsource.javax.servlet org.springframework.context o..
myBatis DAO Pattern example GenericMyBatisDaoSupport.java package com.openerp.common.dao; import java.io.Serializable; import java.util.ArrayList; import org.apache.ibatis.exceptions.PersistenceException; public interface GenericMyBatisDaoSupport{ public T get(PK id) throws PersistenceException;//get obj of type T by the primary key 'id' public ArrayList getAll() throws PersistenceException;//get all objects of type T publ..
MyBatis 3.2) Mapper 방식과 DAO Pattern은 같이 사용할 수 없다. Mapper 방식은 아래 처럼 사용한다. pacakge com.openerp.dao public interface RoleDao{ List listRole(Parameters params); List listRole(Parameters params, int pg, int ps); } 이 경우 Mapper에 등록을 했기때문에 roleMapper 라는 이름으로 bean에 등록이 된다. "예전부터 사용해오던 DAO 패턴을 같이 쓸 수 없을까?" 라는 궁금증이 생겨 반나절동안 해 보았는데... 안된다. DAO 패턴도 어쨋든 Spring DI에 등록이 되어야 하는데 같은 클래스가 두개의 이름으로 등록이 되는 현상이 발생된다. No qualifying bean of type [com.openerp.dao.RoleD..
Spring 3.2.3 + myBatis 3.2.2 기존에 사용하던 Spring 3.1에서 3.2.3으로 변경했다. 하는김에 myBatis도 최신으로 변경.. 이러다가 그냥 back-end를 다 최신으로 변경하기로 작정하고 작업 진행.. applicationContext.xml 에서 myBatis 설정이 조금 변경되었다. org.springframework.orm.ibatis.support.SqlMapClientDaoSupport as of Spring 3.2, in favor of the native Spring support in the Mybatis follow-up project (http://code.google.com/p/mybatis/) org.springframework.orm.ibatis.SqlMapClientFactoryBean as o..