2021/06
logger cannot be resolved 해결법
위에 import가 되있는지 확인해보자. import org.slf4j.Logger; import org.slf4j.LoggerFactory;
log4j Multiple annotations found at this line 에러 해결
log4j설정을 완료했음에도 불구하고 에러가 뜰때가 있다. 이때는 외부경로로 설정해주면 해결된다. 위 코드의 형광색으로 색칠한 부분을 아래내용으로 바꿔주자. http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd
Multiple markers at this line 종류별 해결법
- The type "클래스이름" must implement the inherited abstract method InitializingBean. afterPropertiesSet() @Override public void afterPropertiesSet() throws Exception { System.out.println("afterPropertiesSet()"); //setAdminId(env.getProperty("admin.id")); //setAdminPw(env.getProperty("admin.pw")); } - The type "클래스이름" must implement the inherited abstract method DisposableBean. destroy() @Override p..
The method getConnection() is undefined for the type DataSource 해결책
위에 import javax.sql.DataSource; 를 적어주자
Logger cannot be resolved to a type 해결책
pom.xml에 들어가서 log4j를 검색한후 runtime를 주석처리해준다. " target="_blank" rel="noopener">-->
@RunWith(SpringJUnit4ClassRunner.class) 에러 해결법
@Runwith import를 성공적으로 했는데 아직도 에러가 나는경우 SpringJUnit4ClassRunner를 import하지 않았기때문이다. import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 를 추가해주자
@Setter Autowired cannot be resolved to a type 해결법
위에 import org.springframework.beans.factory.annotation.*; 추가해보자