Is the red letter in the console window an error when running as a spring in Eclipse?

Asked 2 years ago, Updated 2 years ago, 62 views

I started studying about springs for the first time

Every time you run it, the desired result is printed and stored in the database

Those red letters are printed together.

What do you mean? Is this an error?

Code content:

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() + "Registration Successful");

        User user2 = dao.get(user.getId());
        System.out.println(user2.getName());
        System.out.println(user2.getPassword());

        System.out.println (user2.getId() + "Query successful");
    }
}

Output contents:

March 22, 2016 11:57:50 AM org.springframework.context.support.AbstractApplicationContextprepareRefresh Information: Refresh org.springframework.context.notation.AnnotationConfigApplicationContext@21b8d17c:startupdate [Tue Mar 22 11:57:50 KST 2016]; root of context hierarchy March 22, 2016 11:57:50 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantSingles Information: Pre-instantiating singles in org.springframework.beans.factory.support.DefaultListableBeanFactory@5ecddf8f:definingbeans [org.springframework.context.annotation.internalConfigurationAnnotation.pronunciation.Procession.prontery,Pronunciation.Protection.Pronunciation.PronunciationonProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,daoFactory,userDao,connectionMaker]; root of factory hierarchy testId2 registration successful TEST2 password2 TestId2 lookup successful

spring java

2022-09-22 14:26

1 Answers

In the Eclipse console window, the red letter is the output of a message that appears as Standard Error Output.

Everything that Java outputs through System.err is displayed in red on the console. This means that the red color of the console may or may not be an error depending on the content.

In the case of the attached screenshot, the spring outputs the default log, but it does not specify the log message output method, so it outputs the log as the standard error output of the console by default. The contents of the current red part can be considered as a normal log of the operation of the spring.


2022-09-22 14:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.