摘要:本文主要記錄了在Eclipse中執行Maven命令時,控制檯出現亂碼的問題,以及解決辦法。spring
在執行「mvn clean install」命令時,當執行到測試的代碼時,控制檯打印亂碼:測試
1 Running com.bookstore.test.TestDB 2 ���� 01, 2020 4:50:34 ���� org.springframework.beans... 3 ��Ϣ: Loading XML bean definitions from class path resource [spring.xml] 4 ���� 01, 2020 4:50:34 ���� org.springframework.context... 5 ��Ϣ: Refreshing org.springframework.context... 6 ���� 01, 2020 4:50:34 ���� org.springframework.core... 7 ��Ϣ: Loading properties file from class path resource [jdbc.properties]
在pom.xml文件中加入配置:spa
1 <properties> 2 <argLine>-Dfile.encoding=UTF-8</argLine> 3 </properties>