IDEA中在使用单元测试的时候,如何使用Scanner 点击Help,然后找到Edit Custom VM Options 然后输入:-Deditable.java.test.console=true 最后重启一下IDEA就好了