控制台println在eclipse中未打印 [英] console println in eclipse not printed
问题描述
我已经在教程中简单的弹出应用程序。
运行应用程序让我在控制台中没有错误。
I have made a simple spring application followin a tutorial. Running the application gives me no errors in the console.
问题:但不幸的是,我没有在控制台中得到程序的任何打印。
我也不能调试,因为Eclipse不会在断点停止。
Problem: But unfortunately I do not get any prints by the program in the console. I am also not able to debug because Eclipse does not stop at the break point.
注意:我还发现了一个 post 关于eclipse控制台,但解决方案似乎并不适合我。我认为这是我的项目中的一个问题。
Note: I have also found a post about the eclipse console but the solutions do not really seem to work for me. I think it is a problem in my project.
问题:我必须打开一个特殊的视角才能在控制台中看到prinln输出吗?
Question: Do I have to open a special perspective to see the prinln output in the console?
主类:
public class SpringDataDemo {
public static void main(String[] args) {
try {
ApplicationContext context = new ClassPathXmlApplicationContext("resources\\spring-configuration.xml");
// Fetch the DAO from Spring Bean Factory
EmployeeDao employeeDao = (EmployeeDao) context.getBean("EmployeeDaoImpl");
Employee employee = new Employee("Employee123");
// employee.setEmployeeId("1");
// Save an employee Object using the configured Data source
employeeDao.save(employee);
System.out.println("Employee Saved with EmployeeId " + employee.getEmployeeId());
// find an object using Primary Key
Employee emp = employeeDao.findByPrimaryKey(employee.getEmployeeId());
System.out.println(emp);
// Close the ApplicationContext
((ConfigurableApplicationContext) context).close();
} catch (BeansException | SQLException e) {
e.printStackTrace();
}
}
}
推荐答案
我也在一段时间内断开了Eclipse控制台。您可能有多个线程运行相同的实例,只需查看错误的控制台选项卡。
无论如何,最简单的修复将是完全重新启动系统。
I got the Eclipse console broken once in a while too. You might have multiple threads running the same instance, just looking at the wrong console tab. Anyway easiest fix would be to completely restart your system.
这篇关于控制台println在eclipse中未打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!