[{"data":1,"prerenderedAt":1683},["ShallowReactive",2],{"page-en-\u002Fblog\u002Fspring-boot-4-whats-new":3,"related-en-\u002Fblog\u002Fspring-boot-4-whats-new":1663},{"id":4,"title":5,"body":6,"date":1651,"description":1652,"extension":1653,"meta":1654,"navigation":194,"path":1655,"seo":1656,"stem":1657,"tags":1658,"translation":1661,"__hash__":1662},"pages_en\u002Fen\u002Fblog\u002Fspring-boot-4-whats-new.md","Spring Boot 4 and Spring Framework 7: What's New and How to Migrate",{"type":7,"value":8,"toc":1638},"minimark",[9,14,27,31,91,94,234,238,245,252,306,309,313,325,399,500,510,514,517,749,752,769,794,797,801,811,903,967,982,993,997,1000,1031,1190,1196,1200,1203,1278,1437,1454,1458,1492,1496,1513,1584,1627,1631,1634],[10,11,13],"h2",{"id":12},"introduction","Introduction",[15,16,17,18,22,23,26],"p",{},"Spring Boot 4 is the new major release, built on Spring Framework 7. It is not as disruptive as the ",[19,20,21],"code",{},"javax"," → ",[19,24,25],{},"jakarta"," move in Spring Boot 3, but the dependency layout, the default JSON library and some APIs have changed, so it deserves a deliberate migration plan. This post covers the highlights and the steps to follow when moving from 3.5 to 4.",[10,28,30],{"id":29},"_1-baselines","1. Baselines",[32,33,34,47],"table",{},[35,36,37],"thead",{},[38,39,40,44],"tr",{},[41,42,43],"th",{},"Component",[41,45,46],{},"Spring Boot 4 \u002F Framework 7",[48,49,50,59,67,75,83],"tbody",{},[38,51,52,56],{},[53,54,55],"td",{},"Java",[53,57,58],{},"Minimum 17, recommended 25 (LTS)",[38,60,61,64],{},[53,62,63],{},"Jakarta EE",[53,65,66],{},"11 — Servlet 6.1, Persistence (JPA) 3.2, Bean Validation 3.1",[38,68,69,72],{},[53,70,71],{},"Hibernate ORM",[53,73,74],{},"7.x",[38,76,77,80],{},[53,78,79],{},"Kotlin",[53,81,82],{},"2.2",[38,84,85,88],{},[53,86,87],{},"Embedded server",[53,89,90],{},"Tomcat or Jetty; Undertow support was dropped",[15,92,93],{},"Java 17 is still enough, but running on Java 25 makes sense for the virtual thread improvements, the AOT cache and compact object headers.",[95,96,101],"pre",{"className":97,"code":98,"language":99,"meta":100,"style":100},"language-xml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cparent>\n    \u003CgroupId>org.springframework.boot\u003C\u002FgroupId>\n    \u003CartifactId>spring-boot-starter-parent\u003C\u002FartifactId>\n    \u003Cversion>4.0.0\u003C\u002Fversion>\n\u003C\u002Fparent>\n\n\u003Cproperties>\n    \u003Cjava.version>25\u003C\u002Fjava.version>\n\u003C\u002Fproperties>\n","xml","",[19,102,103,119,142,161,180,189,196,206,225],{"__ignoreMap":100},[104,105,108,112,116],"span",{"class":106,"line":107},"line",1,[104,109,111],{"class":110},"sMK4o","\u003C",[104,113,115],{"class":114},"swJcz","parent",[104,117,118],{"class":110},">\n",[104,120,122,125,128,131,135,138,140],{"class":106,"line":121},2,[104,123,124],{"class":110},"    \u003C",[104,126,127],{"class":114},"groupId",[104,129,130],{"class":110},">",[104,132,134],{"class":133},"sTEyZ","org.springframework.boot",[104,136,137],{"class":110},"\u003C\u002F",[104,139,127],{"class":114},[104,141,118],{"class":110},[104,143,145,147,150,152,155,157,159],{"class":106,"line":144},3,[104,146,124],{"class":110},[104,148,149],{"class":114},"artifactId",[104,151,130],{"class":110},[104,153,154],{"class":133},"spring-boot-starter-parent",[104,156,137],{"class":110},[104,158,149],{"class":114},[104,160,118],{"class":110},[104,162,164,166,169,171,174,176,178],{"class":106,"line":163},4,[104,165,124],{"class":110},[104,167,168],{"class":114},"version",[104,170,130],{"class":110},[104,172,173],{"class":133},"4.0.0",[104,175,137],{"class":110},[104,177,168],{"class":114},[104,179,118],{"class":110},[104,181,183,185,187],{"class":106,"line":182},5,[104,184,137],{"class":110},[104,186,115],{"class":114},[104,188,118],{"class":110},[104,190,192],{"class":106,"line":191},6,[104,193,195],{"emptyLinePlaceholder":194},true,"\n",[104,197,199,201,204],{"class":106,"line":198},7,[104,200,111],{"class":110},[104,202,203],{"class":114},"properties",[104,205,118],{"class":110},[104,207,209,211,214,216,219,221,223],{"class":106,"line":208},8,[104,210,124],{"class":110},[104,212,213],{"class":114},"java.version",[104,215,130],{"class":110},[104,217,218],{"class":133},"25",[104,220,137],{"class":110},[104,222,213],{"class":114},[104,224,118],{"class":110},[104,226,228,230,232],{"class":106,"line":227},9,[104,229,137],{"class":110},[104,231,203],{"class":114},[104,233,118],{"class":110},[10,235,237],{"id":236},"_2-modular-auto-configuration-and-new-starters","2. Modular auto-configuration and new starters",[15,239,240,241,244],{},"In Spring Boot 3 all auto-configuration classes lived in a single large ",[19,242,243],{},"spring-boot-autoconfigure"," jar. In Boot 4 that was split into smaller, technology-specific modules. The result: only the code for the technologies you use is on the classpath, the application starts faster and IDE suggestions become more relevant.",[15,246,247,248,251],{},"Starters were renamed in the same spirit to be more explicit. For example, Spring MVC based web applications use ",[19,249,250],{},"spring-boot-starter-webmvc",":",[95,253,255],{"className":97,"code":254,"language":99,"meta":100,"style":100},"\u003Cdependency>\n    \u003CgroupId>org.springframework.boot\u003C\u002FgroupId>\n    \u003CartifactId>spring-boot-starter-webmvc\u003C\u002FartifactId>\n\u003C\u002Fdependency>\n",[19,256,257,266,282,298],{"__ignoreMap":100},[104,258,259,261,264],{"class":106,"line":107},[104,260,111],{"class":110},[104,262,263],{"class":114},"dependency",[104,265,118],{"class":110},[104,267,268,270,272,274,276,278,280],{"class":106,"line":121},[104,269,124],{"class":110},[104,271,127],{"class":114},[104,273,130],{"class":110},[104,275,134],{"class":133},[104,277,137],{"class":110},[104,279,127],{"class":114},[104,281,118],{"class":110},[104,283,284,286,288,290,292,294,296],{"class":106,"line":144},[104,285,124],{"class":110},[104,287,149],{"class":114},[104,289,130],{"class":110},[104,291,250],{"class":133},[104,293,137],{"class":110},[104,295,149],{"class":114},[104,297,118],{"class":110},[104,299,300,302,304],{"class":106,"line":163},[104,301,137],{"class":110},[104,303,263],{"class":114},[104,305,118],{"class":110},[15,307,308],{},"To ease migration there are also broad \"classic\" starters that behave close to the old layout. When moving a large project, getting it to compile with those first and then switching to technology-specific starters is a good strategy. Some test annotations moved packages along with the modules; for compile errors, the IDE's import suggestions are usually enough.",[10,310,312],{"id":311},"_3-null-safety-with-jspecify","3. Null-safety with JSpecify",[15,314,315,316,319,320,324],{},"Spring Framework 7 replaced its own ",[19,317,318],{},"org.springframework.lang.Nullable"," annotations with the standard ",[321,322,323],"strong",{},"JSpecify"," annotations. The nullness of Spring APIs is now understood correctly by IntelliJ, NullAway and Kotlin. You can use the same approach in your own code:",[95,326,330],{"className":327,"code":328,"language":329,"meta":100,"style":100},"language-java shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F package-info.java\n@NullMarked\npackage com.example.orders;\n\nimport org.jspecify.annotations.NullMarked;\n","java",[19,331,332,338,347,370,374],{"__ignoreMap":100},[104,333,334],{"class":106,"line":107},[104,335,337],{"class":336},"sHwdD","\u002F\u002F package-info.java\n",[104,339,340,343],{"class":106,"line":121},[104,341,342],{"class":110},"@",[104,344,346],{"class":345},"spNyl","NullMarked\n",[104,348,349,353,356,359,362,364,367],{"class":106,"line":144},[104,350,352],{"class":351},"sbssI","package",[104,354,355],{"class":345}," com",[104,357,358],{"class":110},".",[104,360,361],{"class":345},"example",[104,363,358],{"class":110},[104,365,366],{"class":345},"orders",[104,368,369],{"class":110},";\n",[104,371,372],{"class":106,"line":163},[104,373,195],{"emptyLinePlaceholder":194},[104,375,376,379,382,384,387,389,392,394,397],{"class":106,"line":182},[104,377,378],{"class":351},"import",[104,380,381],{"class":345}," org",[104,383,358],{"class":110},[104,385,386],{"class":345},"jspecify",[104,388,358],{"class":110},[104,390,391],{"class":345},"annotations",[104,393,358],{"class":110},[104,395,396],{"class":345},"NullMarked",[104,398,369],{"class":110},[95,400,402],{"className":327,"code":401,"language":329,"meta":100,"style":100},"import org.jspecify.annotations.Nullable;\n\npublic interface CustomerRepository {\n    @Nullable Customer findByEmail(String email);   \u002F\u002F may return null\n    Customer getById(long id);                       \u002F\u002F never returns null\n}\n",[19,403,404,425,429,444,474,495],{"__ignoreMap":100},[104,405,406,408,410,412,414,416,418,420,423],{"class":106,"line":107},[104,407,378],{"class":351},[104,409,381],{"class":345},[104,411,358],{"class":110},[104,413,386],{"class":345},[104,415,358],{"class":110},[104,417,391],{"class":345},[104,419,358],{"class":110},[104,421,422],{"class":345},"Nullable",[104,424,369],{"class":110},[104,426,427],{"class":106,"line":121},[104,428,195],{"emptyLinePlaceholder":194},[104,430,431,434,437,441],{"class":106,"line":144},[104,432,433],{"class":345},"public",[104,435,436],{"class":345}," interface",[104,438,440],{"class":439},"sBMFI"," CustomerRepository",[104,442,443],{"class":110}," {\n",[104,445,446,449,451,454,458,461,464,468,471],{"class":106,"line":163},[104,447,448],{"class":110},"    @",[104,450,422],{"class":345},[104,452,453],{"class":345}," Customer",[104,455,457],{"class":456},"s2Zo4"," findByEmail",[104,459,460],{"class":110},"(",[104,462,463],{"class":345},"String",[104,465,467],{"class":466},"sHdIc"," email",[104,469,470],{"class":110},");",[104,472,473],{"class":336},"   \u002F\u002F may return null\n",[104,475,476,479,482,484,487,490,492],{"class":106,"line":182},[104,477,478],{"class":345},"    Customer",[104,480,481],{"class":456}," getById",[104,483,460],{"class":110},[104,485,486],{"class":345},"long",[104,488,489],{"class":466}," id",[104,491,470],{"class":110},[104,493,494],{"class":336},"                       \u002F\u002F never returns null\n",[104,496,497],{"class":106,"line":191},[104,498,499],{"class":110},"}\n",[15,501,502,503,506,507,358],{},"Every type in a ",[19,504,505],{},"@NullMarked"," package is non-null by default; you only mark the places that can be null with ",[19,508,509],{},"@Nullable",[10,511,513],{"id":512},"_4-api-versioning","4. API versioning",[15,515,516],{},"Versioning REST APIs is now supported at the framework level. You can write different handlers for different versions of the same path:",[95,518,520],{"className":327,"code":519,"language":329,"meta":100,"style":100},"@RestController\n@RequestMapping(\"\u002Fapi\u002Fusers\")\npublic class UserController {\n\n    @GetMapping(path = \"\u002F{id}\", version = \"1.0\")\n    public UserV1 getV1(@PathVariable long id) {\n        return userService.findV1(id);\n    }\n\n    @GetMapping(path = \"\u002F{id}\", version = \"1.1\")\n    public UserV2 getV2(@PathVariable long id) {\n        return userService.findV2(id);\n    }\n}\n",[19,521,522,529,550,562,566,606,633,655,660,664,698,721,739,744],{"__ignoreMap":100},[104,523,524,526],{"class":106,"line":107},[104,525,342],{"class":110},[104,527,528],{"class":345},"RestController\n",[104,530,531,533,536,538,541,545,547],{"class":106,"line":121},[104,532,342],{"class":110},[104,534,535],{"class":345},"RequestMapping",[104,537,460],{"class":110},[104,539,540],{"class":110},"\"",[104,542,544],{"class":543},"sfazB","\u002Fapi\u002Fusers",[104,546,540],{"class":110},[104,548,549],{"class":110},")\n",[104,551,552,554,557,560],{"class":106,"line":144},[104,553,433],{"class":345},[104,555,556],{"class":345}," class",[104,558,559],{"class":439}," UserController",[104,561,443],{"class":110},[104,563,564],{"class":106,"line":163},[104,565,195],{"emptyLinePlaceholder":194},[104,567,568,570,573,575,578,581,584,587,589,592,595,597,599,602,604],{"class":106,"line":182},[104,569,448],{"class":110},[104,571,572],{"class":345},"GetMapping",[104,574,460],{"class":110},[104,576,577],{"class":439},"path",[104,579,580],{"class":110}," =",[104,582,583],{"class":110}," \"",[104,585,586],{"class":543},"\u002F{id}",[104,588,540],{"class":110},[104,590,591],{"class":110},",",[104,593,594],{"class":439}," version",[104,596,580],{"class":110},[104,598,583],{"class":110},[104,600,601],{"class":543},"1.0",[104,603,540],{"class":110},[104,605,549],{"class":110},[104,607,608,611,614,617,620,623,626,628,631],{"class":106,"line":191},[104,609,610],{"class":345},"    public",[104,612,613],{"class":345}," UserV1",[104,615,616],{"class":456}," getV1",[104,618,619],{"class":110},"(@",[104,621,622],{"class":345},"PathVariable",[104,624,625],{"class":345}," long",[104,627,489],{"class":466},[104,629,630],{"class":110},")",[104,632,443],{"class":110},[104,634,635,639,642,644,647,649,652],{"class":106,"line":198},[104,636,638],{"class":637},"s7zQu","        return",[104,640,641],{"class":133}," userService",[104,643,358],{"class":110},[104,645,646],{"class":456},"findV1",[104,648,460],{"class":110},[104,650,651],{"class":133},"id",[104,653,654],{"class":110},");\n",[104,656,657],{"class":106,"line":208},[104,658,659],{"class":110},"    }\n",[104,661,662],{"class":106,"line":227},[104,663,195],{"emptyLinePlaceholder":194},[104,665,667,669,671,673,675,677,679,681,683,685,687,689,691,694,696],{"class":106,"line":666},10,[104,668,448],{"class":110},[104,670,572],{"class":345},[104,672,460],{"class":110},[104,674,577],{"class":439},[104,676,580],{"class":110},[104,678,583],{"class":110},[104,680,586],{"class":543},[104,682,540],{"class":110},[104,684,591],{"class":110},[104,686,594],{"class":439},[104,688,580],{"class":110},[104,690,583],{"class":110},[104,692,693],{"class":543},"1.1",[104,695,540],{"class":110},[104,697,549],{"class":110},[104,699,701,703,706,709,711,713,715,717,719],{"class":106,"line":700},11,[104,702,610],{"class":345},[104,704,705],{"class":345}," UserV2",[104,707,708],{"class":456}," getV2",[104,710,619],{"class":110},[104,712,622],{"class":345},[104,714,625],{"class":345},[104,716,489],{"class":466},[104,718,630],{"class":110},[104,720,443],{"class":110},[104,722,724,726,728,730,733,735,737],{"class":106,"line":723},12,[104,725,638],{"class":637},[104,727,641],{"class":133},[104,729,358],{"class":110},[104,731,732],{"class":456},"findV2",[104,734,460],{"class":110},[104,736,651],{"class":133},[104,738,654],{"class":110},[104,740,742],{"class":106,"line":741},13,[104,743,659],{"class":110},[104,745,747],{"class":106,"line":746},14,[104,748,499],{"class":110},[15,750,751],{},"How the version is read from the request is configured with a Spring Boot property:",[95,753,756],{"className":754,"code":755,"language":203,"meta":100,"style":100},"language-properties shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","spring.mvc.apiversion.use.header=API-Version\n",[19,757,758],{"__ignoreMap":100},[104,759,760,763,766],{"class":106,"line":107},[104,761,762],{"class":114},"spring.mvc.apiversion.use.header",[104,764,765],{"class":110},"=",[104,767,768],{"class":133},"API-Version\n",[95,770,774],{"className":771,"code":772,"language":773,"meta":100,"style":100},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -H \"API-Version: 1.1\" http:\u002F\u002Flocalhost:8080\u002Fapi\u002Fusers\u002F42\n","bash",[19,775,776],{"__ignoreMap":100},[104,777,778,781,784,786,789,791],{"class":106,"line":107},[104,779,780],{"class":439},"curl",[104,782,783],{"class":543}," -H",[104,785,583],{"class":110},[104,787,788],{"class":543},"API-Version: 1.1",[104,790,540],{"class":110},[104,792,793],{"class":543}," http:\u002F\u002Flocalhost:8080\u002Fapi\u002Fusers\u002F42\n",[15,795,796],{},"Besides a header, versioning via a query parameter, a path segment or a media type parameter is also supported.",[10,798,800],{"id":799},"_5-http-service-clients","5. HTTP service clients",[15,802,803,806,807,810],{},[19,804,805],{},"@HttpExchange"," interfaces have existed since Spring 6, but each needed a manual bean definition through ",[19,808,809],{},"HttpServiceProxyFactory",". Now they are registered automatically in groups:",[95,812,814],{"className":327,"code":813,"language":329,"meta":100,"style":100},"@HttpExchange(\"\u002Frepos\")\npublic interface GithubClient {\n\n    @GetExchange(\"\u002F{owner}\u002F{repo}\")\n    Repository getRepository(@PathVariable String owner, @PathVariable String repo);\n}\n",[19,815,816,834,845,849,867,899],{"__ignoreMap":100},[104,817,818,820,823,825,827,830,832],{"class":106,"line":107},[104,819,342],{"class":110},[104,821,822],{"class":345},"HttpExchange",[104,824,460],{"class":110},[104,826,540],{"class":110},[104,828,829],{"class":543},"\u002Frepos",[104,831,540],{"class":110},[104,833,549],{"class":110},[104,835,836,838,840,843],{"class":106,"line":121},[104,837,433],{"class":345},[104,839,436],{"class":345},[104,841,842],{"class":439}," GithubClient",[104,844,443],{"class":110},[104,846,847],{"class":106,"line":144},[104,848,195],{"emptyLinePlaceholder":194},[104,850,851,853,856,858,860,863,865],{"class":106,"line":163},[104,852,448],{"class":110},[104,854,855],{"class":345},"GetExchange",[104,857,460],{"class":110},[104,859,540],{"class":110},[104,861,862],{"class":543},"\u002F{owner}\u002F{repo}",[104,864,540],{"class":110},[104,866,549],{"class":110},[104,868,869,872,875,877,879,882,885,887,890,892,894,897],{"class":106,"line":182},[104,870,871],{"class":345},"    Repository",[104,873,874],{"class":456}," getRepository",[104,876,619],{"class":110},[104,878,622],{"class":345},[104,880,881],{"class":345}," String",[104,883,884],{"class":466}," owner",[104,886,591],{"class":110},[104,888,889],{"class":110}," @",[104,891,622],{"class":345},[104,893,881],{"class":345},[104,895,896],{"class":466}," repo",[104,898,654],{"class":110},[104,900,901],{"class":106,"line":191},[104,902,499],{"class":110},[95,904,906],{"className":327,"code":905,"language":329,"meta":100,"style":100},"@Configuration\n@ImportHttpServices(group = \"github\", types = GithubClient.class)\npublic class HttpClientsConfig { }\n",[19,907,908,915,952],{"__ignoreMap":100},[104,909,910,912],{"class":106,"line":107},[104,911,342],{"class":110},[104,913,914],{"class":345},"Configuration\n",[104,916,917,919,922,924,927,929,931,934,936,938,941,943,945,947,950],{"class":106,"line":121},[104,918,342],{"class":110},[104,920,921],{"class":345},"ImportHttpServices",[104,923,460],{"class":110},[104,925,926],{"class":439},"group",[104,928,580],{"class":110},[104,930,583],{"class":110},[104,932,933],{"class":543},"github",[104,935,540],{"class":110},[104,937,591],{"class":110},[104,939,940],{"class":439}," types",[104,942,580],{"class":110},[104,944,842],{"class":133},[104,946,358],{"class":110},[104,948,949],{"class":133},"class",[104,951,549],{"class":110},[104,953,954,956,958,961,964],{"class":106,"line":144},[104,955,433],{"class":345},[104,957,556],{"class":345},[104,959,960],{"class":439}," HttpClientsConfig",[104,962,963],{"class":110}," {",[104,965,966],{"class":110}," }\n",[95,968,970],{"className":754,"code":969,"language":203,"meta":100,"style":100},"spring.http.serviceclient.github.base-url=https:\u002F\u002Fapi.github.com\n",[19,971,972],{"__ignoreMap":100},[104,973,974,977,979],{"class":106,"line":107},[104,975,976],{"class":114},"spring.http.serviceclient.github.base-url",[104,978,765],{"class":110},[104,980,981],{"class":133},"https:\u002F\u002Fapi.github.com\n",[15,983,984,985,988,989,992],{},"You can now inject ",[19,986,987],{},"GithubClient"," into any bean and use it directly; ",[19,990,991],{},"RestClient"," runs underneath.",[10,994,996],{"id":995},"_6-built-in-resilience-retry-and-concurrency-limits","6. Built-in resilience: retry and concurrency limits",[15,998,999],{},"The core features of the Spring Retry project moved into Spring Framework itself. Method-level retries and concurrency limits work without an extra dependency:",[95,1001,1003],{"className":327,"code":1002,"language":329,"meta":100,"style":100},"@Configuration\n@EnableResilientMethods\npublic class ResilienceConfig { }\n",[19,1004,1005,1011,1018],{"__ignoreMap":100},[104,1006,1007,1009],{"class":106,"line":107},[104,1008,342],{"class":110},[104,1010,914],{"class":345},[104,1012,1013,1015],{"class":106,"line":121},[104,1014,342],{"class":110},[104,1016,1017],{"class":345},"EnableResilientMethods\n",[104,1019,1020,1022,1024,1027,1029],{"class":106,"line":144},[104,1021,433],{"class":345},[104,1023,556],{"class":345},[104,1025,1026],{"class":439}," ResilienceConfig",[104,1028,963],{"class":110},[104,1030,966],{"class":110},[95,1032,1034],{"className":327,"code":1033,"language":329,"meta":100,"style":100},"@Service\npublic class PaymentGateway {\n\n    @Retryable(includes = ConnectException.class)\n    public PaymentResult charge(PaymentRequest request) {\n        return client.charge(request);\n    }\n\n    @ConcurrencyLimit(10)\n    public Report generateReport(long id) {\n        return reportEngine.render(id);\n    }\n}\n",[19,1035,1036,1043,1054,1058,1081,1103,1122,1126,1130,1144,1164,1182,1186],{"__ignoreMap":100},[104,1037,1038,1040],{"class":106,"line":107},[104,1039,342],{"class":110},[104,1041,1042],{"class":345},"Service\n",[104,1044,1045,1047,1049,1052],{"class":106,"line":121},[104,1046,433],{"class":345},[104,1048,556],{"class":345},[104,1050,1051],{"class":439}," PaymentGateway",[104,1053,443],{"class":110},[104,1055,1056],{"class":106,"line":144},[104,1057,195],{"emptyLinePlaceholder":194},[104,1059,1060,1062,1065,1067,1070,1072,1075,1077,1079],{"class":106,"line":163},[104,1061,448],{"class":110},[104,1063,1064],{"class":345},"Retryable",[104,1066,460],{"class":110},[104,1068,1069],{"class":439},"includes",[104,1071,580],{"class":110},[104,1073,1074],{"class":133}," ConnectException",[104,1076,358],{"class":110},[104,1078,949],{"class":133},[104,1080,549],{"class":110},[104,1082,1083,1085,1088,1091,1093,1096,1099,1101],{"class":106,"line":182},[104,1084,610],{"class":345},[104,1086,1087],{"class":345}," PaymentResult",[104,1089,1090],{"class":456}," charge",[104,1092,460],{"class":110},[104,1094,1095],{"class":345},"PaymentRequest",[104,1097,1098],{"class":466}," request",[104,1100,630],{"class":110},[104,1102,443],{"class":110},[104,1104,1105,1107,1110,1112,1115,1117,1120],{"class":106,"line":191},[104,1106,638],{"class":637},[104,1108,1109],{"class":133}," client",[104,1111,358],{"class":110},[104,1113,1114],{"class":456},"charge",[104,1116,460],{"class":110},[104,1118,1119],{"class":133},"request",[104,1121,654],{"class":110},[104,1123,1124],{"class":106,"line":198},[104,1125,659],{"class":110},[104,1127,1128],{"class":106,"line":208},[104,1129,195],{"emptyLinePlaceholder":194},[104,1131,1132,1134,1137,1139,1142],{"class":106,"line":227},[104,1133,448],{"class":110},[104,1135,1136],{"class":345},"ConcurrencyLimit",[104,1138,460],{"class":110},[104,1140,1141],{"class":351},"10",[104,1143,549],{"class":110},[104,1145,1146,1148,1151,1154,1156,1158,1160,1162],{"class":106,"line":666},[104,1147,610],{"class":345},[104,1149,1150],{"class":345}," Report",[104,1152,1153],{"class":456}," generateReport",[104,1155,460],{"class":110},[104,1157,486],{"class":345},[104,1159,489],{"class":466},[104,1161,630],{"class":110},[104,1163,443],{"class":110},[104,1165,1166,1168,1171,1173,1176,1178,1180],{"class":106,"line":700},[104,1167,638],{"class":637},[104,1169,1170],{"class":133}," reportEngine",[104,1172,358],{"class":110},[104,1174,1175],{"class":456},"render",[104,1177,460],{"class":110},[104,1179,651],{"class":133},[104,1181,654],{"class":110},[104,1183,1184],{"class":106,"line":723},[104,1185,659],{"class":110},[104,1187,1188],{"class":106,"line":741},[104,1189,499],{"class":110},[15,1191,1192,1195],{},[19,1193,1194],{},"@ConcurrencyLimit"," matters especially with virtual threads: since the thread count is no longer a natural limit, you have to explicitly cap how many requests hit a slow downstream service at the same time.",[10,1197,1199],{"id":1198},"_7-jackson-3","7. Jackson 3",[15,1201,1202],{},"Jackson 3 is the default JSON library in Spring Boot 4. The most visible change is the packages and group ids:",[32,1204,1205,1217],{},[35,1206,1207],{},[38,1208,1209,1211,1214],{},[41,1210],{},[41,1212,1213],{},"Jackson 2",[41,1215,1216],{},"Jackson 3",[48,1218,1219,1234,1249,1265],{},[38,1220,1221,1224,1229],{},[53,1222,1223],{},"Group id",[53,1225,1226],{},[19,1227,1228],{},"com.fasterxml.jackson.core",[53,1230,1231],{},[19,1232,1233],{},"tools.jackson.core",[38,1235,1236,1239,1244],{},[53,1237,1238],{},"Package",[53,1240,1241],{},[19,1242,1243],{},"com.fasterxml.jackson.databind",[53,1245,1246],{},[19,1247,1248],{},"tools.jackson.databind",[38,1250,1251,1254,1259],{},[53,1252,1253],{},"Preferred type",[53,1255,1256],{},[19,1257,1258],{},"ObjectMapper",[53,1260,1261,1264],{},[19,1262,1263],{},"JsonMapper"," (immutable, configured via builder)",[38,1266,1267,1270,1275],{},[53,1268,1269],{},"Annotations",[53,1271,1272],{},[19,1273,1274],{},"com.fasterxml.jackson.annotation",[53,1276,1277],{},"Unchanged",[95,1279,1281],{"className":327,"code":1280,"language":329,"meta":100,"style":100},"import tools.jackson.databind.json.JsonMapper;\n\n@Service\npublic class EventPublisher {\n    private final JsonMapper jsonMapper;\n\n    public EventPublisher(JsonMapper jsonMapper) {\n        this.jsonMapper = jsonMapper;\n    }\n\n    public String toJson(OrderCreated event) {\n        return jsonMapper.writeValueAsString(event);\n    }\n}\n",[19,1282,1283,1311,1315,1321,1332,1348,1352,1368,1382,1386,1390,1411,1429,1433],{"__ignoreMap":100},[104,1284,1285,1287,1290,1292,1295,1297,1300,1302,1305,1307,1309],{"class":106,"line":107},[104,1286,378],{"class":351},[104,1288,1289],{"class":345}," tools",[104,1291,358],{"class":110},[104,1293,1294],{"class":345},"jackson",[104,1296,358],{"class":110},[104,1298,1299],{"class":345},"databind",[104,1301,358],{"class":110},[104,1303,1304],{"class":345},"json",[104,1306,358],{"class":110},[104,1308,1263],{"class":345},[104,1310,369],{"class":110},[104,1312,1313],{"class":106,"line":121},[104,1314,195],{"emptyLinePlaceholder":194},[104,1316,1317,1319],{"class":106,"line":144},[104,1318,342],{"class":110},[104,1320,1042],{"class":345},[104,1322,1323,1325,1327,1330],{"class":106,"line":163},[104,1324,433],{"class":345},[104,1326,556],{"class":345},[104,1328,1329],{"class":439}," EventPublisher",[104,1331,443],{"class":110},[104,1333,1334,1337,1340,1343,1346],{"class":106,"line":182},[104,1335,1336],{"class":345},"    private",[104,1338,1339],{"class":345}," final",[104,1341,1342],{"class":345}," JsonMapper",[104,1344,1345],{"class":133}," jsonMapper",[104,1347,369],{"class":110},[104,1349,1350],{"class":106,"line":191},[104,1351,195],{"emptyLinePlaceholder":194},[104,1353,1354,1356,1358,1360,1362,1364,1366],{"class":106,"line":198},[104,1355,610],{"class":345},[104,1357,1329],{"class":456},[104,1359,460],{"class":110},[104,1361,1263],{"class":345},[104,1363,1345],{"class":466},[104,1365,630],{"class":110},[104,1367,443],{"class":110},[104,1369,1370,1373,1376,1378,1380],{"class":106,"line":208},[104,1371,1372],{"class":110},"        this.",[104,1374,1375],{"class":133},"jsonMapper ",[104,1377,765],{"class":110},[104,1379,1345],{"class":133},[104,1381,369],{"class":110},[104,1383,1384],{"class":106,"line":227},[104,1385,659],{"class":110},[104,1387,1388],{"class":106,"line":666},[104,1389,195],{"emptyLinePlaceholder":194},[104,1391,1392,1394,1396,1399,1401,1404,1407,1409],{"class":106,"line":700},[104,1393,610],{"class":345},[104,1395,881],{"class":345},[104,1397,1398],{"class":456}," toJson",[104,1400,460],{"class":110},[104,1402,1403],{"class":345},"OrderCreated",[104,1405,1406],{"class":466}," event",[104,1408,630],{"class":110},[104,1410,443],{"class":110},[104,1412,1413,1415,1417,1419,1422,1424,1427],{"class":106,"line":723},[104,1414,638],{"class":637},[104,1416,1345],{"class":133},[104,1418,358],{"class":110},[104,1420,1421],{"class":456},"writeValueAsString",[104,1423,460],{"class":110},[104,1425,1426],{"class":133},"event",[104,1428,654],{"class":110},[104,1430,1431],{"class":106,"line":741},[104,1432,659],{"class":110},[104,1434,1435],{"class":106,"line":746},[104,1436,499],{"class":110},[15,1438,1439,1440,1443,1444,1447,1448,1450,1451,358],{},"Since annotations such as ",[19,1441,1442],{},"@JsonProperty"," and ",[19,1445,1446],{},"@JsonIgnore"," stay in the same package, most of your DTOs keep working unchanged. The changes are mostly in ",[19,1449,1258],{}," customizations and your own serializers\u002Fdeserializers. Jackson 3 also uses unchecked exceptions instead of the checked ",[19,1452,1453],{},"JsonProcessingException",[10,1455,1457],{"id":1456},"_8-other-additions","8. Other additions",[1459,1460,1461,1476,1486],"ul",{},[1462,1463,1464,1467,1468,1471,1472,1475],"li",{},[321,1465,1466],{},"RestTestClient:"," write REST tests against ",[19,1469,1470],{},"MockMvc"," or a running server with a fluent, ",[19,1473,1474],{},"WebTestClient","-like API.",[1462,1477,1478,1481,1482,1485],{},[321,1479,1480],{},"BeanRegistrar:"," a new interface for registering beans programmatically, conditionally or in loops; used via ",[19,1483,1484],{},"@Import"," and compatible with AOT\u002Fnative images.",[1462,1487,1488,1491],{},[321,1489,1490],{},"Hibernate 7:"," Jakarta Persistence 3.2 support; some deprecated APIs were removed.",[10,1493,1495],{"id":1494},"_9-migration-checklist","9. Migration checklist",[1497,1498,1499,1506],"ol",{},[1462,1500,1501,1502,1505],{},"First move to the latest Spring Boot ",[321,1503,1504],{},"3.5.x"," and fix all deprecation warnings; most APIs removed in 4.0 were marked deprecated in 3.x.",[1462,1507,1508,1509,1512],{},"Add ",[19,1510,1511],{},"spring-boot-properties-migrator"," during the migration; it logs renamed properties at startup:",[95,1514,1516],{"className":97,"code":1515,"language":99,"meta":100,"style":100},"\u003Cdependency>\n    \u003CgroupId>org.springframework.boot\u003C\u002FgroupId>\n    \u003CartifactId>spring-boot-properties-migrator\u003C\u002FartifactId>\n    \u003Cscope>runtime\u003C\u002Fscope>\n\u003C\u002Fdependency>\n",[19,1517,1518,1526,1542,1558,1576],{"__ignoreMap":100},[104,1519,1520,1522,1524],{"class":106,"line":107},[104,1521,111],{"class":110},[104,1523,263],{"class":114},[104,1525,118],{"class":110},[104,1527,1528,1530,1532,1534,1536,1538,1540],{"class":106,"line":121},[104,1529,124],{"class":110},[104,1531,127],{"class":114},[104,1533,130],{"class":110},[104,1535,134],{"class":133},[104,1537,137],{"class":110},[104,1539,127],{"class":114},[104,1541,118],{"class":110},[104,1543,1544,1546,1548,1550,1552,1554,1556],{"class":106,"line":144},[104,1545,124],{"class":110},[104,1547,149],{"class":114},[104,1549,130],{"class":110},[104,1551,1511],{"class":133},[104,1553,137],{"class":110},[104,1555,149],{"class":114},[104,1557,118],{"class":110},[104,1559,1560,1562,1565,1567,1570,1572,1574],{"class":106,"line":163},[104,1561,124],{"class":110},[104,1563,1564],{"class":114},"scope",[104,1566,130],{"class":110},[104,1568,1569],{"class":133},"runtime",[104,1571,137],{"class":110},[104,1573,1564],{"class":114},[104,1575,118],{"class":110},[104,1577,1578,1580,1582],{"class":106,"line":182},[104,1579,137],{"class":110},[104,1581,263],{"class":114},[104,1583,118],{"class":110},[1497,1585,1586,1597,1600,1603,1610,1619,1622],{"start":144},[1462,1587,1588,1589,1592,1593,1596],{},"Make sure all ",[19,1590,1591],{},"javax.*"," imports are fully moved to ",[19,1594,1595],{},"jakarta.*"," (this should already be done with Boot 3).",[1462,1598,1599],{},"Update your starters; compile with the classic starters first if needed.",[1462,1601,1602],{},"If you use Undertow, switch to Tomcat or Jetty.",[1462,1604,1605,1606,1609],{},"Read the Hibernate 7 migration notes; custom ",[19,1607,1608],{},"UserType","s, dialect settings and native queries need testing.",[1462,1611,1612,1613,1615,1616,1618],{},"Jackson 3: update ",[19,1614,1258],{}," customizations, custom serializers and ",[19,1617,1243],{}," imports.",[1462,1620,1621],{},"Upgrade other Spring projects such as Spring Cloud, Spring Security and Spring AI to their Boot 4 compatible versions.",[1462,1623,1624,1625,358],{},"Run the full test suite, check the migrator logs, then remove ",[19,1626,1511],{},[10,1628,1630],{"id":1629},"conclusion","Conclusion",[15,1632,1633],{},"Spring Boot 4 is not a big break like Boot 3 was; it is more of a release that clears out years of accumulated baggage and focuses on modern Java. The modular layout means lighter applications, JSpecify means safer code, and API versioning, HTTP service clients and built-in resilience mean fewer third-party dependencies. If you migrate through 3.5, clean up deprecations and test the Jackson 3 and Hibernate 7 changes, the process goes quite smoothly.",[1635,1636,1637],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}",{"title":100,"searchDepth":121,"depth":121,"links":1639},[1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650],{"id":12,"depth":121,"text":13},{"id":29,"depth":121,"text":30},{"id":236,"depth":121,"text":237},{"id":311,"depth":121,"text":312},{"id":512,"depth":121,"text":513},{"id":799,"depth":121,"text":800},{"id":995,"depth":121,"text":996},{"id":1198,"depth":121,"text":1199},{"id":1456,"depth":121,"text":1457},{"id":1494,"depth":121,"text":1495},{"id":1629,"depth":121,"text":1630},"2026-11-18","The main changes in Spring Boot 4 and Spring Framework 7 — Jakarta EE 11, modular auto-configuration, JSpecify null-safety, API versioning, HTTP service clients, built-in resilience, Jackson 3 and the steps to migrate from 3.5.","md",{},"\u002Fen\u002Fblog\u002Fspring-boot-4-whats-new",{"title":5,"description":1652},"en\u002Fblog\u002Fspring-boot-4-whats-new",[329,1659,1660],"spring","guide","\u002Fblog\u002Fspring-boot-4-whats-new","ESOCMJEyXVH86F03hGJ9N8zsyjadhFnRLzxHqfPrKcY",[1664,1670,1676],{"path":1665,"title":1666,"description":1667,"date":1668,"tags":1669},"\u002Fen\u002Fblog\u002Fjava-25-features","Java 25 LTS: What Changed Since Java 21?","The features that became final between Java 21 and 25 — unnamed variables, stream gatherers, compact source files, scoped values, flexible constructor bodies, the AOT cache and compact object headers.","2026-11-17",[329,1660],{"path":1671,"title":1672,"description":1673,"date":1674,"tags":1675},"\u002Fen\u002Fblog\u002Fjava-21-features","What's New in Java 21: Virtual Threads, Records and Pattern Matching","The Java 21 LTS features that change day-to-day code the most — virtual threads, records, switch pattern matching, record patterns, sealed classes and sequenced collections.","2026-11-01",[329,1660],{"path":1677,"title":1678,"description":1679,"date":1680,"tags":1681},"\u002Fen\u002Fblog\u002Finstall-java-on-centos-7-rhel-7","Installing Java on CentOS 7 & Red Hat Enterprise Linux 7","Installing Java 11 (OpenJDK) on CentOS 7 and RHEL 7 with yum, plus picking an alternative version — a short step-by-step guide.","2019-11-08",[329,1682],"linux",1794970271655]