成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

SpringBoot2.1升級(jí)2.2.x遷移方法

這篇文章主要講解了“SpringBoot2.1升級(jí)2.2.x遷移方法”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“SpringBoot2.1升級(jí)2.2.x遷移方法”吧!

專注于為中小企業(yè)提供成都網(wǎng)站設(shè)計(jì)、成都做網(wǎng)站服務(wù),電腦端+手機(jī)端+微信端的三站合一,更高效的管理,為中小企業(yè)大寧免費(fèi)做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動(dòng)了1000多家企業(yè)的穩(wěn)健成長(zhǎng),幫助中小企業(yè)通過網(wǎng)站建設(shè)實(shí)現(xiàn)規(guī)模擴(kuò)充和轉(zhuǎn)變。

1. MediaType.APPLICATION_JSON_UTF8_VALUE ===>>> MediaType.APPLICATION_JSON_VALUE

  • MediaType.APPLICATION_JSON_UTF8_VALUE 已被標(biāo)記@Deprecated

  • 等效于{@link MediaType#APPLICATION_JSON_UTF8}的字符串。@deprecated自Spring Framework 5.2起不推薦使用,而推薦使用{@link #APPLICATION_JSON_VALUE}由于主要的瀏覽器(例如Chrome)現(xiàn)在已符合規(guī)范并正確解釋了UTF-8特殊字符 不需要{@code charset = UTF-8}參數(shù)。

2. org.springframework.data.domain.Sort 過時(shí) 新的替代方法: ????

  • 之前的寫法:Sort sort = new Sort(Sort.Direction.DESC, "taskId"); 如何替代?

  • 現(xiàn)在的寫法:Sort sort = Sort.by(Sort.Direction.DESC, "taskId"); 原因:private Sort(Direction direction, List<String> properties)是內(nèi)部構(gòu)造方法,不能在外部使用,外部使用Sort.by(Direction direction, List<String> properties);

3.Actuator HTTP Trace and Auditing are disabled by default 默認(rèn)關(guān)閉 如何配置開啟

The Actuator HTTP Trace and Auditing features are not enabled by default anymore, since the default repositories implementations are in-memory and may consume too many resources and are not cluster friendly For robust, production-grade HTTP tracing we recommend the use of Spring Cloud Sleuth or similar.

To enable HTTP tracing, contribute a bean implementing HttpTraceRepository or AuditEventRepository to turn those features back on. Configuration properties are available to turn those features off even in the presence of those beans (see management.auditevents.enabled and management.trace.http.enabled)

4.Lazy initialization

  • It is now possible to enable global lazy initialization to reduce startup time via the spring.main.lazy-initialization property. Please note that using that feature comes at a cost:

Handling of HTTP requests may take longer while any deferred initialisation occurs

Failures that would normally occur at startup will now not occur until later

Individual beans can opt out of lazy initialization by annotating their definition with @Lazy(false). Where it is not possible to use @Lazy(false) to opt out of lazy initialization, a LazyInitializationExcludeFilter bean can be used instead. For example, to never set IntegrationFlow beans to lazy, you can use the following code:

@Bean static LazyInitializationExcludeFilter integrationLazyInitExcludeFilter() { return LazyInitializationExcludeFilter.forBeanTypes(IntegrationFlow.class); }

5.Reactor響應(yīng)式編程事務(wù)支持的增強(qiáng)

Reactive Elasticsearch Auto-configuration

6.Spring Boot如何讓W(xué)eb API自動(dòng)生成文檔,并解決swagger-annotations的API注解description屬性廢棄的問題

  • https://blog.csdn.net/zhangchao19890805/article/details/54863338

  • 舊: @Api(description="歸檔")

  • 新: @Api(tags={"歸檔"})

JMX now disabled by default

  • As of #16090, JMX is not enabled by default anymore. This feature can be enabled with the configuration property spring.jmx.enabled=true. If you’re using IDE features to administer your applications, you may want to enable that flag there as well.

7.BlogServerApplication: Failed to retrieve application JMX service URL

8.@ConfigurationProperties scanning

Dependency Upgrades Spring Boot 2.2 moves to new versions of several Spring projects:

Reactor Dysprosium

Spring AMQP 2.2

Spring Batch 4.2

Spring Data Moore

Spring Framework 5.2

Spring HATEOAS 1.0

Spring Integration 5.2

Spring Kafka 2.3

Spring Security 5.2

Spring Session Corn

Numerous third-party dependencies have also been updated, some of the more noteworthy of which are the following:

Artemis 2.9

Elasticsearch 6.7

Flyway 6.0

Git Commit ID Plugin 3.0

Hazelcast 3.12

HSQLDB 2.5

Jackson 2.10

Jedis 3.1

Jersey 2.29

Kafka 2.3

Lettuce 5.2

Micrometer 1.3

Mockito 3.1

Solr 8.0

Miscellaneous Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:

loadOnStartup can be configured if you’re wrapping a Servlet as an actuator endpoint.

Flyway bootstrap failures are covered by a dedicated FailureAnalyzer

The MessageConverter for Kafka batch listeners is properly auto-configured.

Add support for Jaybird 4 (jdbc:firebird prefix).

Add opt-in support for Neo4j-OGM native types.

Client-side HTTP-metrics have an outcome tag.

Numerous upgrades of third-party dependencies

Prometheus push gateway can now be configured using https

Printer and Parser beans are automatically registered with the application conversion service.

When using the H2 console auto-configuration, JDBC connection URL is now logged at startup for ease of connection.

Couchbase role-based access is now supported via spring.couchbase.username and spring.couchbase.password.

Support for OAuth3 resource server opaque token authentication has been added and can be configured using the spring.security.oauth3.resourceserver.opaquetoken configuration properties.

The application will fail fast if spring.config.location specifies a file with an extension that no PropertySourceLoader can read.

The layout to use to repackage the application can be set on the command line with Maven using the spring-boot.repackage.layout property.

RestTemplateBuilder#defaultHeader accepts more than one value.

Custom resource handlers can serve a favicon.

Kafka’s RecordInterceptor is detected and associated to the auto-configured listener container.

YAML configuration can now use on or off for boolean types.

Actuator discovery page is now available on / when using a separate management port.

@WebMvcTest now scans HandlerInterceptor beans.

@WebFluxTest scans WebFilter beans.

Configurable timeout for JMS listener container’s receive.

Support for Spring Session’s flush mode.

Support for Spring AMQP’s confirm-type.

Application properties for configuring Jetty’s thread pool.

Support for parallel test execution when using @AutoConfigureMockMvc with JUnit 5.

Zip64 files are now supported inside "Fat Jars".

The ROLLING_FILE_LOG_PATTERN is now exposed for use in logback configurations.

You can now inject and use a customized WebTestClient in any @SpringBootTest.

Dependency management for Oracle’s JDBC driver has been added.

Dependency management for Awaitility has been added.

Deprecations in Spring Boot 2.2 The logging.file property has been renamed to logging.file.name.

The logging.path property has been renamed to logging.file.path.

The server.connection-timeout property has been deprecated in favor of server-specific properties since their behaviors are not strictly the same.

The server.use-forward-headers property has been deprecated in favor of server.forward-headers-strategy; previously server.use-forward-headers=true would use the web server native support. You can now achieve the same with server.forward-headers-strategy=native. Because each server has a specific behavior, we now offer an alternative which relies on Spring’s ForwardedHeaderFilter: server.forward-headers-strategy=framework. Developers should use the option that fits best their use case.

ReactiveWebServerApplicationContext#getWebServerFactory.

The agent property of the Maven plugin has been renamed to agents.

Joda time support is deprecated in favour of java.time.

ApplicationHealthIndicator in favour of PingHealthIndicator that is always contributed.

ConfigurationBeanFactoryMetadata in favour of ConfigurationPropertiesBean.

ConfigurationPropertiesBindingPostProcessor constructors in favor of @EnableConfigurationProperties or the register method.

ConfigurationPropertiesBindingPostProcessor.VALIDATOR_BEAN_NAME has moved to EnableConfigurationProperties.VALIDATOR_BEAN_NAME.

ConfigurationPropertiesBindingPostProcessorRegistrar in favor of @EnableConfigurationProperties.

WebTestClientBuilderCustomizer has been relocated to org.springframework.boot.test.web.reactive.server.

參考

  • Spring-Boot-2.2-Release-Notes

感謝各位的閱讀,以上就是“SpringBoot2.1升級(jí)2.2.x遷移方法”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)SpringBoot2.1升級(jí)2.2.x遷移方法這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!

新聞名稱:SpringBoot2.1升級(jí)2.2.x遷移方法
網(wǎng)站路徑:http://jinyejixie.com/article32/psgdpc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站建設(shè)、網(wǎng)站策劃響應(yīng)式網(wǎng)站、靜態(tài)網(wǎng)站標(biāo)簽優(yōu)化、全網(wǎng)營銷推廣

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

綿陽服務(wù)器托管
夏津县| 宜良县| 抚顺市| 方正县| 天峻县| 汪清县| 临海市| 沭阳县| 旌德县| 德惠市| 土默特左旗| 新宁县| 黄平县| 临朐县| 霍州市| 台南县| 临武县| 太原市| 边坝县| 象山县| 综艺| 屯昌县| 集贤县| 翼城县| 九龙县| 阿鲁科尔沁旗| 集安市| 焦作市| 西安市| 乐东| 大田县| 周宁县| 沾益县| 昌吉市| 屏南县| 桓台县| 临清市| 平潭县| 吉林市| 抚远县| 平谷区|