Java近期新闻:Grail 5.0、Spring、Hibernate、WildFly及Kotlin Multik开发库更新

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2021年10月11日起始周Java新闻更新:OpenJDK、JDK 18、Spring Framework、Grails 5.0、Micronaut 3.1、Helidon 2.3.4、Hibernate ORM和Hibernate Reactive GA版本、与WildFly 25、GraalVM Native Tools 0.96、Apache Camel 3.11.3、Piranha 21.10.0相关的更新,以及Kotlin的Multik多维数组开发库。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":" OpenJDK"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":" 经过一周的评审,JEP 408,也就是Simple Web Server由JDK 18的Proposed to Target状态进入到了Targeted。这个JEP提供了一个基于HTTP命令行的、最小化的、只提供静态文件的Web服务器。这个工具主要用于构建原型、临时编码和测试,特别是在培训环境中。这个Web服务器可以通过以下命令来启动:"}]},{"type":"codeblock","attrs":{"lang":null},"content":[{"type":"text","text":" $ java -m jdk.httpserver [-b bind address] [-p port] [-d directory] [-h to show help message] [-o none|default|verbose]"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/openjdk.java.net\/jeps\/419","title":null,"type":null},"content":[{"type":"text","text":"JEP 419"}]},{"type":"text","text":",也就是外部函数和内存API从Draft状态进入到了Candidate。该JEP从JEP 412(已在JDK 17中发布)演化而来,基于Java社区的反馈做了改进,主要变更包括:支持更多的内存访问变量句柄,如boolean和MemoryAddress接口;MemoryAddress和MemorySegment接口的解除引用API;简化持有调用方法句柄的API,不再需要传递MemoryType枚举;在内存段之间拷贝数组的新API。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"JDK 18"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"JDK 18尝鲜构建版"},{"type":"link","attrs":{"href":"https:\/\/github.com\/openjdk\/jdk\/releases\/tag\/jdk-18%2B19","title":null,"type":null},"content":[{"type":"text","text":"Build 19"}]},{"type":"text","text":"可用,修复了在Build 18中存在的各种问题,更多细节可参看发布"},{"type":"link","attrs":{"href":"https:\/\/jdk.java.net\/18\/release-notes","title":null,"type":null},"content":[{"type":"text","text":"公告"}]},{"type":"text","text":"。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"JDK 18目前的特性集合如下:"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"JEP 400:"},{"type":"link","attrs":{"href":"https:\/\/openjdk.java.net\/jeps\/400","title":null,"type":null},"content":[{"type":"text","text":"默认字符集为UTF-8"}]},{"type":"text","text":";"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"JEP 408:"},{"type":"link","attrs":{"href":"https:\/\/openjdk.java.net\/jeps\/408","title":null,"type":null},"content":[{"type":"text","text":"Simple Web Server"}]},{"type":"text","text":";"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"JEP 413:"},{"type":"link","attrs":{"href":"https:\/\/openjdk.java.net\/jeps\/413","title":null,"type":null},"content":[{"type":"text","text":"Java API文档中加入了代码片段"}]},{"type":"text","text":";"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"JEP 417:"},{"type":"link","attrs":{"href":"https:\/\/openjdk.java.net\/jeps\/417","title":null,"type":null},"content":[{"type":"text","text":"Vector API(第三个孵化器)"}]},{"type":"text","text":"。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"开发者可以通过"},{"type":"link","attrs":{"href":"https:\/\/bugreport.java.com\/bugreport\/","title":null,"type":null},"content":[{"type":"text","text":"Java Bug Database"}]},{"type":"text","text":"提交bug。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Spring Framework"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Spring Framework发布多个单点版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"5.3.11版本包含了32个问题修复和改进,5.2.18.RELEASE版本包含10个问题修复和改进。这个两个版本都提供了一个增强的DefaultResponseErrorHandler类,可以将整个错误响应消息体记录到日志当中。5.3.11版本的其他新特性包括:支持非公开的Record声明;可以直接调用实现了Closeable和AutoCloseable接口的类的close()方法。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Grails"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Grails基金会发布了Grails 5.0,升级了多个依赖项:Apache Groovy 3、Micronaut Framework 3、Gradle 7、Spring Boot 2.5、Spring Framework 5.3以及Spock 2.0。其他值得注意的变更还包括:弃用基于点号的访问模式;默认按类型装配,取代了按名字装配;Gradle插件改动。更新细节可在发布"},{"type":"link","attrs":{"href":"https:\/\/github.com\/grails\/grails-core\/releases\/tag\/v5.0.0","title":null,"type":null},"content":[{"type":"text","text":"公告"}]},{"type":"text","text":"和"},{"type":"link","attrs":{"href":"https:\/\/grails.org\/documentation.html","title":null,"type":null},"content":[{"type":"text","text":"文档"}]},{"type":"text","text":"中找到。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Micronaut"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Micronaut基金会发布了"},{"type":"link","attrs":{"href":"https:\/\/micronaut.io\/2021\/10\/11\/micronaut-framework-released\/","title":null,"type":null},"content":[{"type":"text","text":"Micronaut 3.1"}]},{"type":"text","text":",带来了大量的新特性,包括:支持JDK 17;工厂Bean可以创建原始类型或原始数组类型的Bean;新的@InjectScope注解,用于销毁无定义作用域的Bean;对生成类的自检进行了优化;改进了针对Kotlin的上下文传播;在HTTP过滤器中使用正则表达式。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Helidon"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Helidon 2.3.4发布,改进的特性包括:修复了WebServer组件存在的问题,比如Netty服务器在负载下会挂起,以及在检查消息体是否被完全读取时出现的静态条件;修复了WebClient的一个问题,如果一个主机地址出现在一个非主机列表中,将其转换成相对的请求RUI;修复了与Metrics组件相关的问题,如新的PeriodExecutor类会错误地记录警告信息,警告信息的消息可能是错误的,以及指标性能优化导致的原生镜像构建错误。更多细节可以参看发布"},{"type":"link","attrs":{"href":"https:\/\/github.com\/oracle\/helidon\/releases\/tag\/2.3.4","title":null,"type":null},"content":[{"type":"text","text":"公告"}]},{"type":"text","text":"。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Hibernate"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Hibernate发布了"},{"type":"link","attrs":{"href":"https:\/\/hibernate.org\/orm\/","title":null,"type":null},"content":[{"type":"text","text":"Hibernate ORM"}]},{"type":"text","text":"的单点版本和"},{"type":"link","attrs":{"href":"https:\/\/hibernate.org\/reactive\/","title":null,"type":null},"content":[{"type":"text","text":"Hibernate Reactive"}]},{"type":"text","text":"的GA版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Hibernate ORM 5.6.0.Final修复了同时使用@EmbeddedId和@MapsId时会出现的一个错误,将依赖项ByteBuddy升级到1.11.20,增加了为升级到Hibernate ORM 6.0而发出的弃用警告信息。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Hibernate ORM 6.0第一个Beta版本的特性包括:迁移到了Jakarta Persistence;改进的类型系统,引入了新的根据位置读取JDBC记录的概念;新的类型注解;改进的时间区域支持。更多细节可以在"},{"type":"link","attrs":{"href":"https:\/\/docs.jboss.org\/hibernate\/orm\/6.0\/userguide\/html_single\/Hibernate_User_Guide.html","title":null,"type":null},"content":[{"type":"text","text":"用户指南"}]},{"type":"text","text":"、"},{"type":"link","attrs":{"href":"https:\/\/github.com\/hibernate\/hibernate-orm\/blob\/6.0.0.Beta1\/migration-guide.adoc","title":null,"type":null},"content":[{"type":"text","text":"迁移指南"}]},{"type":"text","text":"和"},{"type":"link","attrs":{"href":"https:\/\/hibernate.org\/orm\/releases\/6.0\/","title":null,"type":null},"content":[{"type":"text","text":"发布公告"}]},{"type":"text","text":"页找到。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Hibernate Reactive 1.0.0.CR10发布,支持MySQL、DB2和MS SQL Server的"},{"type":"link","attrs":{"href":"https:\/\/hibernate.org\/reactive\/documentation\/1.0\/reference\/html_single\/#_automatic_schema_export","title":null,"type":null},"content":[{"type":"text","text":"自动模式验证和更新"}]},{"type":"text","text":"。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"WildFly"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"WildFly团队向Java社区发布了很多与WildFly 25相关的更新。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"WildFly 25的源码到镜像(Source to Image,S2I)Docker镜像已在quay.io上发布,用于构建、分析和发布容器镜像。这些镜像包含了与WildFly 25 GA版本相关的更新。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/wildfly-extras\/wildfly-jar-maven-plugin\/","title":null,"type":null},"content":[{"type":"text","text":"WildFly Bootable JAR 6.0"}]},{"type":"text","text":" Maven插件发布,特性包括:Galleon配置"},{"type":"link","attrs":{"href":"https:\/\/github.com\/wildfly-extras\/wildfly-jar-maven-plugin\/tree\/6.0.0.Final\/examples","title":null,"type":null},"content":[{"type":"text","text":"示例"}]},{"type":"text","text":";自动生成自签名安全证书;原生支持OpenID Connect。更多细节可以参看这篇"},{"type":"link","attrs":{"href":"https:\/\/www.wildfly.org\/news\/2020\/10\/19\/bootable-jar-2.0-released\/","title":null,"type":null},"content":[{"type":"text","text":"博文"}]},{"type":"text","text":"。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"WildFly 25现在支持MicroProfile Reactive Messaging 2.0规范,基于"},{"type":"link","attrs":{"href":"https:\/\/github.com\/smallrye\/smallrye-reactive-messaging","title":null,"type":null},"content":[{"type":"text","text":"SmallRye Reactive Messaging"}]},{"type":"text","text":"实现。开发者现在可以使用@Channel注解和Emitter接口将数据推送到响应式流中。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"GraalVM"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在1.0版本之前,Oracle实验室发布了0.9.6版本的"},{"type":"link","attrs":{"href":"https:\/\/github.com\/graalvm\/native-build-tools\/","title":null,"type":null},"content":[{"type":"text","text":"Native Build Tools"}]},{"type":"text","text":",提供用于操作GraalVM原生镜像的插件。该版本集成了JUnit 5.8,不过也引入了一个重大变化,导致Maven用户需要定义插件扩展。"}]},{"type":"codeblock","attrs":{"lang":null},"content":[{"type":"text","text":"\n org.graalvm.buildtools\n native-maven-plugin\n ${native.maven.plugin.version}\n true\n"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"不再需要junit-platform-native依赖项,不过Gradle用户仍然需要这个依赖项。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Apache Camel"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Apache Camel 3.11.3发布,包含26个bug修复和改进,包括:依赖项Apache Karaf升级到1.1.11、Camel Spring Boot升级到2.5.5。更多细节可参看发布"},{"type":"link","attrs":{"href":"https:\/\/camel.apache.org\/releases\/release-3.11.3\/","title":null,"type":null},"content":[{"type":"text","text":"公告"}]},{"type":"text","text":"。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Piranha"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Piranha 21.10.0发布。该版本号称是“第一个支持版本”,提供了一个新的支持分支,与自JDK 17以后的LTS Java版本对齐,并支持Jakarta EE。更多细节可以在官方"},{"type":"link","attrs":{"href":"https:\/\/javadoc.io\/doc\/cloud.piranha\/project\/21.10.0\/index.html","title":null,"type":null},"content":[{"type":"text","text":"文档"}]},{"type":"text","text":"和问题追踪系统中找到。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Kotlin Multik开发库"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"JetBrains发布Multik 0.1,一个新的多维数组开发库,可以读写.csv文件,执行代数运算,支持复数,并改进了已有函数的性能。更多细节可以在这篇"},{"type":"link","attrs":{"href":"https:\/\/blog.jetbrains.com\/kotlin\/2021\/02\/multik-multidimensional-arrays-in-kotlin\/","title":null,"type":null},"content":[{"type":"text","text":"博文"}]},{"type":"text","text":"中找到。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"原文链接"},{"type":"text","text":":"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/www.infoq.com\/news\/2021\/10\/java-news-roundup-oct11-2021\/","title":null,"type":null},"content":[{"type":"text","text":"Java News Roundup: Grails 5.0, Spring Framework, Hibernate, WildFly and the Kotlin Multik Library"}]}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章