依赖 <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> </dependency> 使用 String date = new DateTime().toString("yyyy/MM/dd");