{"id":40064,"date":"2022-11-19T05:27:46","date_gmt":"2024-02-09T01:40:43","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/"},"modified":"2024-04-29T01:24:10","modified_gmt":"2024-04-28T17:24:10","slug":"%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/","title":{"rendered":"\u4f7f\u7528Kotlin + Spring Boot 2.1.0 + Thymeleaf + IntelliJ IDEA + Gradle\u6765\u521b\u5efaHello World\u5e94\u7528"},"content":{"rendered":"<h2>\u6458\u8981<\/h2>\n<p>\u4f7f\u7528 IntelliJ IDEA \u7f16\u5199\u7a0b\u5e8f\uff0c\u4f7f\u7528 Kotlin + Spring Boot 2.1.0 + Thymeleaf \u6765\u663e\u793a Hello World\u3002<\/p>\n<h2>\u73af\u5883<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">IntelliJ IDEA Community Version 2018.2.5<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Kotlin plugin version 1.3.0-release-IJ2018.2-1<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Gradle 4.8.1<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Spring Boot 2.1.0<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Thymeleaf 3.0.11<\/ul>\n<h2>\u4f7f\u7528Spring Initializr\u751f\u6210\u9879\u76ee\u7684\u6a21\u677f\u3002<\/h2>\n<p>\u4f7f\u7528 Spring Initializr \u5e76\u6307\u5b9a\u4ee5\u4e0b\u5185\u5bb9\u540e\uff0c\u70b9\u51fb\u300c\u751f\u6210\u9879\u76ee\u300d\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Generate a \u300cGradle Project\u300d with \u300cKotlin\u300d and Spring Boot \u300c2.1.0\u300d<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Group: com.example<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Artifact: demo<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Dependencies: Web, Thymeleaf<\/ul>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/7-0.png\" alt=\"sp1.png\" \/><\/div>\n<p>\u53ef\u4ee5\u4e0b\u8f7d\u9879\u76ee\u7684zip\u6587\u4ef6\u3002<\/p>\n<h3>\u9879\u76ee\u6587\u4ef6<\/h3>\n<p>\u89e3\u538b\u7f29\u5df2\u4e0b\u8f7d\u7684 zip \u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>\u251c\u2500\u2500 build.gradle\r\n\u251c\u2500\u2500 gradle\r\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 wrapper\r\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 gradle-wrapper.jar\r\n\u2502\u00a0\u00a0     \u2514\u2500\u2500 gradle-wrapper.properties\r\n\u251c\u2500\u2500 gradlew\r\n\u251c\u2500\u2500 gradlew.bat\r\n\u251c\u2500\u2500 settings.gradle\r\n\u2514\u2500\u2500 src\r\n    \u251c\u2500\u2500 main\r\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 kotlin\r\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 com\r\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0     \u2514\u2500\u2500 example\r\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0         \u2514\u2500\u2500 demo\r\n    \u2502\u00a0\u00a0 \u2502\u00a0\u00a0             \u2514\u2500\u2500 DemoApplication.kt\r\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 resources\r\n    \u2502\u00a0\u00a0     \u251c\u2500\u2500 application.properties\r\n    \u2502\u00a0\u00a0     \u251c\u2500\u2500 static\r\n    \u2502\u00a0\u00a0     \u2514\u2500\u2500 templates\r\n    \u2514\u2500\u2500 test\r\n        \u2514\u2500\u2500 kotlin\r\n            \u2514\u2500\u2500 com\r\n                \u2514\u2500\u2500 example\r\n                    \u2514\u2500\u2500 demo\r\n                        \u2514\u2500\u2500 DemoApplicationTests.kt\r\n<\/code><\/pre>\n<h3>\u6784\u5efa\u6587\u4ef6 build.gradle<\/h3>\n<p>\u7531\u4e8e\u672c\u6b21\u4f7f\u7528\u4e86 Kotlin 1.3.0 \u7248\u672c\uff0c\u56e0\u6b64\u53ef\u4ee5\u5c06 kotlinVersion = &#8216;1.3.0&#8217; \u4fee\u6539\u4e3a kotlinVersion = &#8216;1.3.0&#8217;\uff0c\u4f46\u4e0d\u5fc5\u4fee\u6b63\u3002<\/p>\n<pre class=\"post-pre\"><code>buildscript {\r\n    ext {\r\n        kotlinVersion = '1.2.70'\r\n        springBootVersion = '2.1.0.RELEASE'\r\n    }\r\n    repositories {\r\n        mavenCentral()\r\n    }\r\n    dependencies {\r\n        classpath(\"org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}\")\r\n        classpath(\"org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}\")\r\n        classpath(\"org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}\")\r\n    }\r\n}\r\n\r\napply plugin: 'kotlin'\r\napply plugin: 'kotlin-spring'\r\napply plugin: 'eclipse'\r\napply plugin: 'org.springframework.boot'\r\napply plugin: 'io.spring.dependency-management'\r\n\r\ngroup = 'com.example'\r\nversion = '0.0.1-SNAPSHOT'\r\nsourceCompatibility = 1.8\r\ncompileKotlin {\r\n    kotlinOptions {\r\n        freeCompilerArgs = [\"-Xjsr305=strict\"]\r\n        jvmTarget = \"1.8\"\r\n    }\r\n}\r\ncompileTestKotlin {\r\n    kotlinOptions {\r\n        freeCompilerArgs = [\"-Xjsr305=strict\"]\r\n        jvmTarget = \"1.8\"\r\n    }\r\n}\r\n\r\nrepositories {\r\n    mavenCentral()\r\n}\r\n\r\n\r\ndependencies {\r\n    implementation('org.springframework.boot:spring-boot-starter-thymeleaf')\r\n    implementation('org.springframework.boot:spring-boot-starter-web')\r\n    implementation('com.fasterxml.jackson.module:jackson-module-kotlin')\r\n    implementation(\"org.jetbrains.kotlin:kotlin-stdlib-jdk8\")\r\n    implementation(\"org.jetbrains.kotlin:kotlin-reflect\")\r\n    testImplementation('org.springframework.boot:spring-boot-starter-test')\r\n}\r\n<\/code><\/pre>\n<h3>\u5e94\u7528\u7a0b\u5e8f\u7c7b DemoApplication.kt\u3002<\/h3>\n<p>\u4e0d\u505a\u4efb\u4f55\u7279\u5225\u4fee\u6539\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.example.demo\r\n\r\nimport org.springframework.boot.autoconfigure.SpringBootApplication\r\nimport org.springframework.boot.runApplication\r\n\r\n@SpringBootApplication\r\nclass DemoApplication\r\n\r\nfun main(args: Array&lt;String&gt;) {\r\n    runApplication&lt;DemoApplication&gt;(*args)\r\n}\r\n<\/code><\/pre>\n<h2>\u5728IntelliJ IDEA\u4e2d\u521b\u5efa\u9879\u76ee<\/h2>\n<p>\u5728IntelliJ IDEA\u4e2d\uff0c\u4f7f\u7528&#8221;Import Project&#8221;\u9009\u9879\u6765\u6307\u5b9abuild.gradle\u6587\u4ef6\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/20-0.png\" alt=\"sp3.png\" \/><\/div>\n<p>\u52fe\u9009&#8221;\u81ea\u52a8\u5bfc\u5165&#8221;\u5e76\u5bfc\u5165\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/22-0.png\" alt=\"sp2.png\" \/><\/div>\n<h2>\u6267\u884c\u539f\u578b\u7a0b\u5e8f<\/h2>\n<p>\u5728IntelliJ IDEA\u7684\u83dc\u5355\u4e2d\uff0c\u9009\u62e9\u201c\u89c6\u56fe\u201d\u2192\u201c\u5de5\u5177\u7a97\u53e3\u201d\u2192\u201cGradle\u201d\uff0c\u7136\u540e\u6253\u5f00Gradle\u7a97\u53e3\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/25-0.png\" alt=\"sp4.png\" \/><\/div>\n<p>\u5728Gradle\u7a97\u53e3\u4e2d\uff0c\u9009\u62e9Tasks \u2192 application \u2192 bootRun\uff0c\u53f3\u952e\u70b9\u51fb\u5e76\u9009\u62e9\u8fd0\u884c&#8217;demo [bootRun]&#8217;\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/27-0.png\" alt=\"sp5.png\" \/><\/div>\n<p>\u8fd0\u884c\u540e\uff0cSpring Boot \u7684\u6d88\u606f\u5c06\u4f1a\u5728\u8fd0\u884c\u7a97\u53e3\u4e2d\u663e\u793a\u5982\u4e0b\u3002<\/p>\n<pre class=\"post-pre\"><code>  .   ____          _            __ _ _\r\n \/\\\\ \/ ___'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\r\n( ( )\\___ | '_ | '_| | '_ \\\/ _` | \\ \\ \\ \\\r\n \\\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\r\n  '  |____| .__|_| |_|_| |_\\__, | \/ \/ \/ \/\r\n =========|_|==============|___\/=\/_\/_\/_\/\r\n :: Spring Boot ::        (v2.1.0.RELEASE)\r\n<\/code><\/pre>\n<p>\u968f\u540e\u4f1a\u663e\u793a\u7c7b\u4f3c\u4e8e\u201cTomcat\u5df2\u5728\u7aef\u53e38080\uff08http\uff09\u4e0a\u542f\u52a8\uff0c\u4e0a\u4e0b\u6587\u8def\u5f84\u4e3a\u7a7a\u201d\u548c\u201cDemoApplicationKt\u5df2\u542f\u52a8\u201d\u7684\u65e5\u5fd7\u3002<\/p>\n<p>\u5f53\u8bbf\u95eehttp:\/\/localhost:8080\u65f6\uff0c\u5c06\u663e\u793a\u4ee5\u4e0b\u6d88\u606f\u3002\u5c3d\u7ba1\u670d\u52a1\u5668\u5df2\u542f\u52a8\uff0c\u4f46\u7a0b\u5e8f\u5185\u5bb9\u4e3a\u7a7a\u3002<\/p>\n<pre class=\"post-pre\"><code>Whitelabel Error Page\r\n\r\nThis application has no explicit mapping for \/error, so you are seeing this as a fallback.\r\n<\/code><\/pre>\n<h2>\u6dfb\u52a0Hello World\u7684\u4ee3\u7801<\/h2>\n<p>\u6dfb\u52a0\u4e24\u4e2a\u6587\u4ef6 HelloController.kt \u548c hello_name.html\uff0c\u5b9e\u73b0 Hello World\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/35-0.png\" alt=\"sp7.png\" \/><\/div>\n<h3>\u6dfb\u52a0\u63a7\u5236\u5668\u7c7b(Controller class)<\/h3>\n<p>\u5c06\u4ee5\u4e0b\u7684HelloController\u7c7b\u6dfb\u52a0\u5230src\/main\/kotlin\/com\/example\/demo\/HelloController.kt\u4e2d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/38-0.png\" alt=\"sp6.png\" \/><\/div>\n<pre class=\"post-pre\"><code>package com.example.demo\r\n\r\nimport org.springframework.stereotype.Controller\r\nimport org.springframework.ui.Model\r\nimport org.springframework.web.bind.annotation.PathVariable\r\nimport org.springframework.web.bind.annotation.ResponseBody\r\nimport org.springframework.web.bind.annotation.RequestMapping\r\nimport org.springframework.web.bind.annotation.RequestMethod\r\n\r\n@Controller\r\nclass HelloController {\r\n\r\n    @RequestMapping(value = [\"\/hello\"], method = [RequestMethod.GET])\r\n    @ResponseBody\r\n    fun hello_world(): String {\r\n        return \"hello, world\"\r\n    }\r\n\r\n    @RequestMapping(value = [\"\/hello\/{name}\"], method = [RequestMethod.GET])\r\n    fun hello_name(@PathVariable name: String, model: Model): String {\r\n        model.addAttribute(\"name\", name)\r\n        return \"hello_name\" \/\/ Thymeleaf \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u540d\r\n    }\r\n}\r\n<\/code><\/pre>\n<h3>\u6dfb\u52a0 Thymeleaf \u7684\u6a21\u677f\u6587\u4ef6<\/h3>\n<p>\u8bf7\u5c06\u4ee5\u4e0bHTML\u6a21\u677f\u6587\u4ef6\u6dfb\u52a0\u5230src\/main\/resources\/templates\/hello_name.html\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"cp\">&lt;!DOCTYPE html&gt;<\/span>\r\n<span class=\"nt\">&lt;html<\/span> <span class=\"na\">lang=<\/span><span class=\"s\">\"ja\"<\/span><span class=\"nt\">&gt;<\/span>\r\n<span class=\"nt\">&lt;head&gt;<\/span>\r\n    <span class=\"nt\">&lt;meta<\/span> <span class=\"na\">charset=<\/span><span class=\"s\">\"UTF-8\"<\/span><span class=\"nt\">&gt;<\/span>\r\n    <span class=\"nt\">&lt;title&gt;<\/span>Hello, [[${name}]]<span class=\"nt\">&lt;\/title&gt;<\/span>\r\n<span class=\"nt\">&lt;\/head&gt;<\/span>\r\n<span class=\"nt\">&lt;body&gt;<\/span>\r\n<span class=\"nt\">&lt;p&gt;<\/span>Hello, [[${name}]]<span class=\"nt\">&lt;\/p&gt;<\/span>\r\n<span class=\"nt\">&lt;\/body&gt;<\/span>\r\n<span class=\"nt\">&lt;\/html&gt;<\/span>\r\n<\/code><\/pre>\n<h2>\u8fd0\u884cHello World\u7a0b\u5e8f<\/h2>\n<p>\u518d\u6b21\u6267\u884c\u7a0b\u5e8f\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/45-0.png\" alt=\"spb.png\" \/><\/div>\n<p>\u8bbf\u95ee http:\/\/localhost:8080\/hello \u4f1a\u663e\u793a&#8221;\u4f60\u597d\uff0c\u4e16\u754c&#8221;\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/47-0.png\" alt=\"sp8.png\" \/><\/div>\n<p>\u5f53\u8bbf\u95ee http:\/\/localhost:8080\/hello\/hoge \u65f6\uff0c\u4f1a\u663e\u793a\u201c\u4f60\u597d\uff0choge\u201d\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/49-0.png\" alt=\"sp9.png\" \/><\/div>\n<p>\u5728\u7f51\u5740\u7684\u201choge\u201d\u90e8\u5206\u53ef\u4ee5\u6307\u5b9a\u4efb\u610f\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/51-0.png\" alt=\"spa.png\" \/><\/div>\n<h2>\u8bf7\u63d0\u4f9b\u76f8\u5173\u4fe1\u606f\u3002<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">IntelliJ IDEA: The Java IDE for Professional Developers by JetBrains<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Spring Boot<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6458\u8981 \u4f7f\u7528 IntelliJ IDEA \u7f16\u5199\u7a0b\u5e8f\uff0c\u4f7f\u7528 Kotlin + Spring Boot 2.1.0  [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-40064","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528Kotlin + Spring Boot 2.1.0 + Thymeleaf + IntelliJ IDEA + Gradle\u6765\u521b\u5efaHello World\u5e94\u7528 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle\u6765\u521b\u5efahello-world\u5e94\u7528\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528Kotlin + Spring Boot 2.1.0 + Thymeleaf + IntelliJ IDEA + Gradle\u6765\u521b\u5efaHello World\u5e94\u7528\" \/>\n<meta property=\"og:description\" content=\"\u6458\u8981 \u4f7f\u7528 IntelliJ IDEA \u7f16\u5199\u7a0b\u5e8f\uff0c\u4f7f\u7528 Kotlin + Spring Boot 2.1.0 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle\u6765\u521b\u5efahello-world\u5e94\u7528\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-09T01:40:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-28T17:24:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/7-0.png\" \/>\n<meta name=\"author\" content=\"\u79d1, \u9896\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u9896\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/\",\"name\":\"\u4f7f\u7528Kotlin + Spring Boot 2.1.0 + Thymeleaf + IntelliJ IDEA + Gradle\u6765\u521b\u5efaHello World\u5e94\u7528 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2024-02-09T01:40:43+00:00\",\"dateModified\":\"2024-04-28T17:24:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528Kotlin + Spring Boot 2.1.0 + Thymeleaf + IntelliJ IDEA + Gradle\u6765\u521b\u5efaHello World\u5e94\u7528\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\",\"name\":\"\u79d1, \u9896\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u9896\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528Kotlin + Spring Boot 2.1.0 + Thymeleaf + IntelliJ IDEA + Gradle\u6765\u521b\u5efaHello World\u5e94\u7528 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle\u6765\u521b\u5efahello-world\u5e94\u7528\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528Kotlin + Spring Boot 2.1.0 + Thymeleaf + IntelliJ IDEA + Gradle\u6765\u521b\u5efaHello World\u5e94\u7528","og_description":"\u6458\u8981 \u4f7f\u7528 IntelliJ IDEA \u7f16\u5199\u7a0b\u5e8f\uff0c\u4f7f\u7528 Kotlin + Spring Boot 2.1.0 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle\u6765\u521b\u5efahello-world\u5e94\u7528\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-02-09T01:40:43+00:00","article_modified_time":"2024-04-28T17:24:10+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d3e3437434c4406c8a1df\/7-0.png"}],"author":"\u79d1, \u9896","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u9896","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/","name":"\u4f7f\u7528Kotlin + Spring Boot 2.1.0 + Thymeleaf + IntelliJ IDEA + Gradle\u6765\u521b\u5efaHello World\u5e94\u7528 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2024-02-09T01:40:43+00:00","dateModified":"2024-04-28T17:24:10+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528Kotlin + Spring Boot 2.1.0 + Thymeleaf + IntelliJ IDEA + Gradle\u6765\u521b\u5efaHello World\u5e94\u7528"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e","name":"\u79d1, \u9896","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","caption":"\u79d1, \u9896"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8kotlin-spring-boot-2-1-0-thymeleaf-intellij-idea-gradle%e6%9d%a5%e5%88%9b%e5%bb%bahello-world%e5%ba%94%e7%94%a8\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=40064"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40064\/revisions"}],"predecessor-version":[{"id":71454,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40064\/revisions\/71454"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=40064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=40064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=40064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}