이클립스에서 스프링으로 실행시 콘솔창의 빨간글씨는 오류인가요?
조회수 3792회
스프링에 관해 처음 공부를 시작하게 되었는데,
실행할때마다 원하는 결과는 출력되고 데이터베이스에도 저장이 되는데
저런 빨간 글씨가 같이 출력이 됩니다.
무슨 의미인가요? 오류인가요?
코드내용 :
import java.sql.SQLException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import spring.user.domain.User;
public class UserDaoTest {
public static void main(String[] args) throws ClassNotFoundException, SQLException {
ApplicationContext context = new AnnotationConfigApplicationContext(DaoFactory.class);
UserDao dao = context.getBean("userDao", UserDao.class);
User user = new User();
user.setId("testId2");
user.setName("TEST2");
user.setPassword("password2");
dao.add(user);
System.out.println(user.getId() + " 등록 성공");
User user2 = dao.get(user.getId());
System.out.println(user2.getName());
System.out.println(user2.getPassword());
System.out.println(user2.getId() + " 조회 성공");
}
}
출력 내용 :
3월 22, 2016 11:57:50 오전 org.springframework.context.support.AbstractApplicationContext prepareRefresh 정보: Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@21b8d17c: startup date [Tue Mar 22 11:57:50 KST 2016]; root of context hierarchy 3월 22, 2016 11:57:50 오전 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 정보: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5ecddf8f: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,daoFactory,userDao,connectionMaker]; root of factory hierarchy testId2 등록 성공 TEST2 password2 testId2 조회 성공
-
(•́ ✖ •̀)
알 수 없는 사용자
1 답변
-
이클립스 콘솔창에서 붉은 글씨는 표준에러출력(Standard Error Output)으로 나온 메시지를 출력하는 것입니다.
자바에서 System.err 를 통해서 출력하는 하는 것은 콘솔에서 모두 붉은색으로 표기됩니다. 즉, 콘솔의 붉은 색은 내용에 따라 에러일 수도 아닐수도 있습니다.
첨부한 스크린샷의 경우, 스프링에서 기본적인 로그를 출력하는 데, 로그 메시지 출력방식을 지정하지 않아서 기본으로 콘솔의 표준에러출력으로 로그를 출력한 것입니다. 현재 붉은 색 부분의 내용은 스프링의 동작에 대한 정상적인 로그라고 보시면 됩니다.
댓글 입력