小编Sha*_*ble的帖子

Spring 3.0.x 支持 Java 8 吗?在 Spring Starter 中,我发现 3.0.x 及更高版本的 sourceCompatibility = '17' 默认值

我试图在 Spring Starter 中创建一个 Spring Boot 3.0.5 应用程序以及 Java 8。下面分享的屏幕截图

春季启动页面

在发布后,我检查了“探索”按钮,该按钮有助于确定代码的外观。

然而,我发现

sourceCompatibility = '17'
Run Code Online (Sandbox Code Playgroud)

我没想到会这样,因为我在上面的屏幕中选择了 Java 8。我在这里错过了什么吗?

探索窗口

java compatibility spring-boot spring-starter

3
推荐指数
1
解决办法
3749
查看次数

使用apache poi输入时间

我已经使用 Apahe POI 将时间输入到 Excel 文件中,如下所示

Time time = Time.valueOf("19:30:00");
CellStyle cellStyle1 = workbook.createCellStyle();
CreationHelper createHelper1 = workbook.getCreationHelper();
cellStyle1.setDataFormat(
        createHelper.createDataFormat().getFormat("HH:MM AM/PM"));
cell = row.getCell(1);
System.out.println(time.toString());
cell.setCellValue(time);
cell.setCellStyle(cellStyle1);
Run Code Online (Sandbox Code Playgroud)

这导致 Excel 符合预期,但是存在以下不匹配情况,发现 Excel 的实际值和显示值不同 - 我怎样才能使它们相同,我是否使用了错误的方法来更新 Excel 时间格式的值 Excel 上输出的屏幕截图

java format time apache-poi

2
推荐指数
1
解决办法
1545
查看次数