{"id":573359,"date":"2025-06-05T13:54:08","date_gmt":"2025-06-05T12:54:08","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=kotlin&#038;p=573359"},"modified":"2025-06-05T13:54:14","modified_gmt":"2025-06-05T12:54:14","slug":"strategic-partnership-with-spring","status":"publish","type":"kotlin","link":"https:\/\/blog.jetbrains.com\/zh-hans\/kotlin\/2025\/06\/strategic-partnership-with-spring\/","title":{"rendered":"\u52a0\u5f3a\u540e\u7aef\u5f00\u53d1\u4e2d\u7684 Kotlin\uff1a\u4e0e Spring \u5efa\u7acb\u6218\u7565\u5408\u4f5c\u4f19\u4f34\u5173\u7cfb"},"content":{"rendered":"<p>JetBrains \u5c06 Kotlin \u89c6\u4e3a\u73b0\u4ee3\u540e\u7aef\u5f00\u53d1\u7684\u575a\u5b9e\u57fa\u7840\uff0c\u8fd9\u4e0d\u4ec5\u662f\u56e0\u4e3a\u5b83\u7684\u6280\u672f\u4f18\u52bf\uff0c\u8fd8\u56e0\u4e3a\u5b83\u80fd\u591f\u5e2e\u52a9\u5f00\u53d1\u8005\u66f4\u9ad8\u6548\u5730\u6784\u5efa\u53ef\u9760\u3001\u53ef\u7ef4\u62a4\u7684\u7cfb\u7edf\u3002 \u6211\u4eec\u4e00\u76f4\u5728\u52aa\u529b\u4f7f Kotlin \u6210\u4e3a\u4e13\u4e1a\u670d\u52a1\u5668\u7aef\u5de5\u4f5c\u7684\u9996\u9009\uff0c\u4e3a\u6b64\uff0c\u6211\u4eec\u8363\u5e78\u5ba3\u5e03 JetBrains \u4e0e Spring \u56e2\u961f\u5c06\u8fdb\u4e00\u6b65\u52a0\u6df1\u5408\u4f5c\u3002<\/p>\n<p>\u8fd9\u4e00\u6218\u7565\u5408\u4f5c\u4f19\u4f34\u5173\u7cfb\u6db5\u76d6\u591a\u4e2a\u5173\u952e\u9886\u57df\uff0c\u5c06\u4f7f Kotlin \u6210\u4e3a\u6784\u5efa Spring \u5e94\u7528\u7a0b\u5e8f\u66f4\u81ea\u7136\u3001\u66f4\u5f3a\u5927\u7684\u9009\u62e9\u3002<\/p>\n<p>Spring Framework \u8054\u5408\u521b\u59cb\u4eba\u517c\u9879\u76ee\u8d1f\u8d23\u4eba Juergen Hoeller \u548c Spring \u6838\u5fc3\u63d0\u4ea4\u8005\u517c Kotlin \u652f\u6301\u8d1f\u8d23\u4eba S\u00e9bastien Deleuze \u8868\u793a\uff1a<\/p>\n<p><em>\u201c\u591a\u5e74\u6765\uff0c\u6211\u4eec\u4e00\u76f4\u5c06 Kotlin \u4f5c\u4e3a Spring \u5e94\u7528\u7a0b\u5e8f\u7684\u9996\u9009\u8bed\u8a00\u3002 \u6211\u4eec\u5f88\u9ad8\u5174\u80fd\u5c06\u8fc4\u4eca\u4e3a\u6b62\u7684\u6709\u673a\u5408\u4f5c\u8f6c\u53d8\u4e3a JetBrains \u548c Spring \u56e2\u961f\u4e4b\u95f4\u7684\u6218\u7565\u5408\u4f5c\uff0c\u8ba9 Kotlin \u5f00\u53d1\u8005\u5728\u4f7f\u7528 Spring \u65f6\u83b7\u5f97\u66f4\u597d\u7684\u4f53\u9a8c\uff01\u201d<\/em><\/p>\n<h2 class=\"wp-block-heading\">\u5173\u952e\u5408\u4f5c\u9886\u57df<\/h2>\n<ul>\n<li><strong>Kotlin \u548c Spring \u5e94\u7528\u7684\u5b8c\u5168 null \u5b89\u5168<\/strong><br \/>Spring \u56e2\u961f\u6b63\u5728\u79ef\u6781\u589e\u5f3a\u6574\u4e2a\u6846\u67b6\u7684 null \u5b89\u5168\u6765\u6539\u8fdb Kotlin \u652f\u6301\u3002 \u8fd9\u4e9b\u6539\u8fdb\u5c06\u81ea\u52a8\u589e\u5f3a Kotlin \u4ee3\u7801\u4e2d\u7684\u7c7b\u578b\u5b89\u5168\uff0c\u65e0\u9700\u989d\u5916\u914d\u7f6e\u3002<\/li>\n<li><strong>Kotlin \u5b98\u65b9\u5b66\u4e60\u8d44\u6599<\/strong><br \/>\u6838\u5fc3 Spring \u5b66\u4e60\u8d44\u6e90\u5c06\u5728 Kotlin \u4e2d\u63d0\u4f9b\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u8f7b\u677e\u5165\u95e8\uff0c\u5e76\u4ece\u4e00\u5f00\u59cb\u5c31\u91c7\u7528\u60ef\u7528\u7684 Kotlin \u505a\u6cd5\u3002<\/li>\n<li><strong>\u4f7f\u7528 kotlinx.reflect \u5b9e\u73b0\u66f4\u5feb\u7684 Kotlin \u53cd\u5c04<\/strong><br \/>JetBrains \u6b63\u5728\u5f00\u53d1\u66f4\u5feb\u7248\u672c\u7684\u65b0\u53cd\u5c04\u5e93 kotlinx.reflect\uff0c\u5e0c\u671b\u63d0\u9ad8\u4e25\u91cd\u4f9d\u8d56\u53cd\u5c04\u7684\u573a\u666f\uff08\u4f8b\u5982\u4f9d\u8d56\u9879\u6ce8\u5165\u548c\u5e8f\u5217\u5316\uff09\u7684\u6027\u80fd\u3002<\/li>\n<li><strong>\u4e0d\u65ad\u53d1\u5c55\u7684\u914d\u7f6e DSL<\/strong><br \/>\u65b0\u7684 <a href=\"https:\/\/docs.spring.io\/spring-framework\/reference\/7.0-SNAPSHOT\/core\/beans\/java\/programmatic-bean-registration.html\" target=\"_blank\" rel=\"noopener\">Bean Registration DSL<\/a> \u5c06\u4e3a\u66f4\u597d\u5730\u652f\u6301 lambda \u548c\u57fa\u4e8e DSL \u7684 Bean \u5b9a\u4e49\u5960\u5b9a\u57fa\u7840\u3002 \u8fd9\u4ec5\u4ec5\u662f\u4e2a\u5f00\u59cb\uff01 \u63a5\u4e0b\u6765\u8fd8\u6709\u66f4\u591a\u6d88\u606f\u5373\u5c06\u53d1\u5e03\u3002<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\">\u7acb\u5373\u5f00\u59cb\u5c06 Kotlin \u4e0e Spring \u7ed3\u5408\u4f7f\u7528\uff01<\/h2>\n<p>\u4eca\u5929\u5ba3\u5e03\u7684\u4e00\u4e9b\u6539\u8fdb\u5c1a\u672a\u5b8c\u6210\uff0c\u4f46 Kotlin \u5df2\u7ecf\u662f Spring \u5e94\u7528\u7a0b\u5e8f\u7684\u7edd\u4f73\u9009\u62e9\u3002\u00a0<\/p>\n<p>Kotlin \u53ef\u4ee5\u7b80\u5316\u5e38\u89c1\u7684\u540e\u7aef\u64cd\u4f5c\uff0c\u4f7f\u4ee3\u7801\u66f4\u7b80\u6d01\u3001\u66f4\u6613\u7ef4\u62a4\u3002 \u5b83\u5141\u8bb8\u5bf9 DTO\u3001\u57df\u6a21\u578b\u548c\u6620\u5c04\uff08\u4f8b\u5982\uff0c\u5b9e\u4f53\u5230 DTO\uff09\u8fdb\u884c\u6e05\u6670\u7d27\u51d1\u7684\u5b9a\u4e49\u3002 \u501f\u52a9\u547d\u540d\u548c\u9ed8\u8ba4\u5f62\u53c2\u7b49\u529f\u80fd\uff0cKotlin \u4e0d\u518d\u9700\u8981\u6784\u5efa\u5668\u6a21\u5f0f\u548c\u5176\u4ed6\u91cd\u8f7d\u76f8\u5173\u6837\u677f\u4ee3\u7801\u3002 \u5b83\u8fd8\u9f13\u52b1\u4f7f\u7528\u6269\u5c55\u51fd\u6570\u548c\u9876\u5c42\u51fd\u6570\u8fdb\u884c\u6a21\u5757\u5316\u8bbe\u8ba1\u3002<\/p>\n<p><em>\u201cKotlin \u548c Spring Boot \u662f\u975e\u5e38\u4f18\u96c5\u5f3a\u5927\u7684\u5806\u6808\u3002 \u73b0\u4ee3 Spring \u7684\u4f18\u79c0\u4e4b\u5904\u5728\u73b0\u4ee3\u8bed\u8a00\u4e2d\u66f4\u52a0\u660e\u663e\uff0c\u201d<\/em>Spring Framework \u539f\u59cb\u521b\u59cb\u4eba Rod Johnson \u8bf4\u3002<\/p>\n<p>\u6b64\u5916\uff0cSpring \u56e2\u961f\u957f\u671f\u4ee5\u6765\u4e00\u76f4\u652f\u6301 Kotlin \u4f18\u5148\u529f\u80fd\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>\u534f\u7a0b\uff1aSpring \u63d0\u4f9b<a href=\"https:\/\/docs.spring.io\/spring-framework\/reference\/languages\/kotlin\/coroutines.html\" target=\"_blank\" rel=\"noopener\">\u4e00\u6d41\u7684\u534f\u7a0b\u652f\u6301<\/a>\uff0c\u4ee5\u4fbf\u4f7f\u7528<a href=\"https:\/\/kotlinlang.org\/docs\/coroutines-guide.html\" target=\"_blank\" rel=\"noopener\">\u7ed3\u6784\u5316\u5e76\u53d1<\/a>\u6784\u5efa\u53cd\u5e94\u5f0f\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<li><a href=\"https:\/\/docs.spring.io\/spring-framework\/reference\/languages\/kotlin\/extensions.html\" target=\"_blank\" rel=\"noopener\">Kotlin \u6269\u5c55<\/a>\uff1aSpring \u63d0\u4f9b DSL \u548c\u6269\u5c55\u51fd\u6570\uff0c\u4f7f Spring \u4ee3\u7801\u66f4\u5177\u8868\u73b0\u529b\uff0c\u66f4\u52a0\u7b80\u6d01\u3002<\/li>\n<li>\u914d\u7f6e DSL\uff1a\u8fd9\u9879\u529f\u80fd\u5141\u8bb8\u7f16\u8bd1\u5668\u5e2e\u52a9\u60a8\u4f7f\u7528 Spring Kotlin DSL \u914d\u7f6e <a href=\"https:\/\/docs.spring.io\/spring-framework\/reference\/languages\/kotlin\/bean-definition-dsl.html\" target=\"_blank\" rel=\"noopener\">Bean<\/a>\u3001<a href=\"https:\/\/docs.spring.io\/spring-security\/reference\/servlet\/configuration\/kotlin.html\" target=\"_blank\" rel=\"noopener\">\u5b89\u5168<\/a>\u6216<a href=\"https:\/\/docs.spring.io\/spring-framework\/reference\/languages\/kotlin\/web.html\" target=\"_blank\" rel=\"noopener\">\u8def\u7531<\/a>\u3002<\/li>\n<\/ul>\n<p>\u65e0\u8bba\u60a8\u662f\u542f\u52a8\u65b0\u7684 Kotlin \u9879\u76ee\uff0c\u8fd8\u662f\u9010\u6b65\u5c06 Kotlin \u6587\u4ef6\u6dfb\u52a0\u5230\u73b0\u6709 Java \u548c Spring \u4ee3\u7801\u5e93\u4e2d\uff0c\u60a8\u90fd\u53ef\u4ee5\u4eab\u53d7\u65e0\u7f1d\u96c6\u6210\u3002 \u5f97\u76ca\u4e8e\u5168\u9762\u7684\u4e92\u64cd\u4f5c\u6027\uff0cKotlin \u548c Java \u53ef\u4ee5\u539f\u751f\u534f\u4f5c\uff0c\u5373\u4f7f\u662f\u5728\u5927\u578b\u9879\u76ee\u4e2d\u60a8\u4e5f\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u6761\u4ef6\u9010\u6b65\u91c7\u7528 Kotlin\u3002<\/p>\n<h2 class=\"wp-block-heading\">Kotlin \u4e0e Spring\uff1a\u6301\u7eed\u53d1\u5c55\u7684\u8d8b\u52bf<\/h2>\n<p>\u4ece\u521b\u4e1a\u516c\u53f8\u5230\u5168\u7403\u6027\u4f01\u4e1a\uff0cKotlin \u5728 Spring \u751f\u6001\u7cfb\u7edf\u4e2d\u7684\u91c7\u7528\u7387\u8fc5\u901f\u589e\u957f\u3002 <a href=\"https:\/\/kotlinlang.org\/lp\/server-side\/case-studies\/expedia\/\" target=\"_blank\" rel=\"noopener\">Expedia<\/a>\u3001<a href=\"https:\/\/youtu.be\/4GkoB4hZUnw?si=udArGmuW9Z3RnSP5\" target=\"_blank\" rel=\"noopener\">Atlassian (Jira Software)<\/a>\u3001<a href=\"http:\/\/mercedes-benz.io\" target=\"_blank\" rel=\"noopener\">Mercedes-Benz.io<\/a> \u7b49\u516c\u53f8\u7684\u56e2\u961f\u5df2\u7ecf\u5728\u5229\u7528 Kotlin \u548c Spring \u7684\u7ec4\u5408\u6765\u52a0\u5feb\u5f00\u53d1\u901f\u5ea6\u5e76\u63d0\u9ad8\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<p>\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u5df2\u7ecf\u6709 27% \u7684 Spring \u5f00\u53d1\u8005\u4f7f\u7528\u8fc7 Kotlin\u3002 \u5176\u4e2d\u751a\u81f3\u5305\u62ec\u6846\u67b6\u7684\u539f\u59cb\u521b\u59cb\u4eba Rod Johnson\uff0c\u4ed6\u5728 KotlinConf 2025 \u7684\u6f14\u8bb2\u4e2d\u81ea\u8c6a\u5730\u5206\u4eab\u4e86\u8fd9\u4e00\u70b9\u3002<\/p>\n<p>\u25b6\ufe0f \u89c2\u770b 5 \u6708 22 \u65e5 10:15 <a href=\"https:\/\/www.youtube.com\/live\/PYAPymKRKVA\" target=\"_blank\" rel=\"noopener\">Rod Johnson \u5728 KotlinConf 2025 \u4e0a\u7684\u5b8c\u6574\u6f14\u8bb2\u76f4\u64ad<\/a>\u3002<\/p>\n<p>\u5982\u679c\u60a8\u53c2\u52a0\u5728\u54e5\u672c\u54c8\u6839\u4e3e\u884c\u7684 KotlinConf 2025\uff0c\u4e0d\u8981\u9519\u8fc7 5 \u6708 22 \u65e5 S\u00e9bastien Deleuze \u7684 <em>Next level Kotlin support in Spring Boot 4<\/em> \u6f14\u8bb2\u3002 \u4ece\u672c\u6b21\u4f1a\u8bae\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4e86\u89e3\u6709\u5173\u5408\u4f5c\u7684\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u4ee5\u53ca\u65e8\u5728\u6539\u5584 Kotlin \u5f00\u53d1\u8005\u7684\u5f00\u53d1\u4f53\u9a8c\u548c Spring Boot \u5e94\u7528\u7a0b\u5e8f\u8fd0\u884c\u65f6\u6548\u7387\u7684\u65b0\u529f\u80fd\u3002 \u6f14\u8bb2\u5f55\u50cf\u5c06\u4e8e KotlinConf 2025 \u7ed3\u675f\u540e\u4e0d\u4e45\u5728 <a href=\"https:\/\/www.youtube.com\/@Kotlin\" target=\"_blank\" rel=\"noopener\">Kotlin YouTube \u9891\u9053<\/a>\u4e0a\u53d1\u5e03\u3002<\/p>\n<p>\u968f\u7740\u5408\u4f5c\u7684\u6269\u5927\u548c\u6301\u7eed\u7684 Kotlin \u4f18\u5148\u6539\u8fdb\uff0c\u4f7f\u7528 Kotlin \u7684\u5f00\u53d1\u8005\u6570\u91cf\u53ea\u4f1a\u7ee7\u7eed\u589e\u957f\u3002 Kotlin \u548c Spring \u4e92\u76f8\u4fc3\u8fdb\uff0c\u800c\u6211\u4eec\u624d\u521a\u521a\u5f00\u59cb\u3002 \u5728 JetBrains \u548c Spring \u56e2\u961f\u7684\u5171\u540c\u52aa\u529b\u4e0b\uff0c\u672a\u6765\u5341\u5e74\u7684\u540e\u7aef\u5f00\u53d1\u6709\u671b\u53d8\u5f97\u66f4\u52a0\u9ad8\u6548\u3001\u66f4\u52a0\u6109\u5feb\uff0c\u5e76\u5177\u6709\u66f4\u591a Kotlin\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u4e0e\u793e\u533a\u4fdd\u6301\u8054\u7cfb\uff01<\/h2>\n<p>\u60f3\u7b2c\u4e00\u65f6\u95f4\u83b7\u53d6\u6709\u5173\u670d\u52a1\u5668\u7aef Kotlin \u7684\u52a8\u6001\uff1f \u52a0\u5165 Kotlin Slack \u4e0a\u7684 <a href=\"https:\/\/slack-chats.kotlinlang.org\/c\/server#9f61c3e7-1f0a-427b-a719-6a8d4407fa32\" target=\"_blank\" rel=\"noopener\">#server<\/a> \u548c <a href=\"https:\/\/slack-chats.kotlinlang.org\/c\/spring\/130#d694eae8-b6d0-4722-a0f8-760ece9dc5c1\" target=\"_blank\" rel=\"noopener\">#spring<\/a> \u9891\u9053\uff08\u5982\u679c\u60a8\u8fd8\u4e0d\u662f\u6210\u5458\uff0c\u8bf7\u5148<a href=\"https:\/\/surveys.jetbrains.com\/s3\/kotlin-slack-sign-up\" target=\"_blank\" rel=\"noopener\">\u83b7\u5f97\u9080\u8bf7<\/a>\uff09\u6216\u8ba2\u9605\u4e3b\u8981 <a href=\"https:\/\/info.jetbrains.com\/kotlin-communication-center.html\" target=\"_blank\" rel=\"noopener\">Kotlin \u65b0\u95fb\u6bcf\u6708\u603b\u7ed3<\/a>\u3002<\/p>\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u672c\u535a\u6587\u82f1\u6587\u539f\u4f5c\u8005\uff1a<\/p>\n\n\n    <div class=\"about-author \">\n        <div class=\"about-author__box\">\n            <div class=\"row\">\n                <div class=\"about-author__box-img\">\n                    <img decoding=\"async\" src=\"https:\/\/secure.gravatar.com\/avatar\/67ceb88f52b2ac33e723bef2980c6f43?s=200&#038;r=g\" width=\"200\" height=\"200\" alt=\"Alina Dolgikh\" loading=\"lazy\"  class=\"avatar avatar-200 wp-user-avatar wp-user-avatar-200 photo avatar-default\">\n                <\/div>\n                <div class=\"about-author__box-text\">\n                                            <h4>Alina Dolgikh<\/h4>\n                                                        <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n\n\n\n<p><\/p>\n","protected":false},"author":1297,"featured_media":569186,"comment_status":"closed","ping_status":"closed","template":"","categories":[909,89],"tags":[76,4975,276],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/kotlin\/573359"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/kotlin"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/kotlin"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/1297"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=573359"}],"version-history":[{"count":7,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/kotlin\/573359\/revisions"}],"predecessor-version":[{"id":573370,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/kotlin\/573359\/revisions\/573370"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media\/569186"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=573359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=573359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=573359"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=573359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}