{"id":41842,"date":"2023-05-14T12:02:47","date_gmt":"2023-06-26T01:32:38","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/"},"modified":"2024-04-30T04:06:52","modified_gmt":"2024-04-29T20:06:52","slug":"%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/","title":{"rendered":"\u5c1d\u8bd5\u8fde\u63a5Springboot\u548cpostgreSQL\u4ee5\u83b7\u53d6\u6570\u636e"},"content":{"rendered":"<h3>\u603b\u7ed3<\/h3>\n<p>\u5c1d\u8bd5\u8fde\u63a5\u5148\u524d\u5728VPS\u4e0a\u5efa\u7acb\u7684postgreSQL\u548cspringboot\uff0c\u4ee5\u83b7\u53d6\u6570\u636e\u3002<\/p>\n<h3>\u73af\u5883<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Springboot 3.0.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\">WIndows 11<\/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\">postgreSQL 14<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">centOS 7.9<\/ul>\n<h3>\u65b9\u6cd5<\/h3>\n<h4>\u5728\u672c\u5730\u8fde\u63a5VPS\u4e0a\u7684postgreSQL\u6570\u636e\u5e93\uff0c\u63d2\u5165\u6570\u636e\u5e76\u8fdb\u884c\u786e\u8ba4\u5c1d\u8bd5\u3002<\/h4>\n<h5>\u5982\u679c\u4e4b\u524d\u6ca1\u6709\u8fdb\u884c\u8fc7\u76f8\u5173\u64cd\u4f5c\uff0c\u8bf7\u5148\u6267\u884c\u6b64\u5904\u7684\u6b65\u9aa4\u3002<\/h5>\n<ul class=\"post-ul\">https:\/\/qiita.com\/eHZ\/items\/5151281ab45e657490dc<\/ul>\n<h5>2. \u5728Windows\u4e0a\u8fde\u63a5\u5230VPS\u7684postgreSQL\u3002<\/h5>\n<pre class=\"post-pre\"><code>psql -h {VPS\u306eIP\u30a2\u30c9\u30ec\u30b9}  -U {\u30e6\u30fc\u30b6\u30fc\u8a2d\u5b9a\u3067\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u540d} -d {\u30e6\u30fc\u30b6\u30fc\u8a2d\u5b9a\u3067\u4f5c\u6210\u3057\u305fDB\u540d}\r\n<\/code><\/pre>\n<h5>3. \u521b\u5efa\u8868\u683c<\/h5>\n<pre class=\"post-pre\"><code>create table {\u65b0\u898f\u30c6\u30fc\u30d6\u30eb\u540d} (id serial, name VARCHAR(60));\r\n<\/code><\/pre>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff0c\u786e\u8ba4\u662f\u5426\u6210\u529f\u521b\u5efa\u4e86\u8868\u683c\u3002<\/p>\n<pre class=\"post-pre\"><code>\\dt\r\n<\/code><\/pre>\n<h5>4. \u6570\u636e\u7684\u5f55\u5165 de<\/h5>\n<p>\u5c06\u6570\u636e\u63d2\u5165\u5230\u5df2\u521b\u5efa\u7684\u8868\u4e2d\u3002<\/p>\n<pre class=\"post-pre\"><code>insert into {TABLE\u540d}(name) values ('\u5c71\u7530'), ('\u9577\u7530'), ('\u7530\u4e2d');\r\n<\/code><\/pre>\n<p>\u5982\u679c\u663e\u793aINSERT 0 3\uff0c\u90a3\u5c31\u6ca1\u95ee\u9898\uff0c\u56e0\u4e3aid serial\u4f1a\u81ea\u52a8\u5206\u914d\u4e00\u4e2a\u7f16\u53f7\u3002<\/p>\n<h5>\u786e\u8ba4\u6570\u636e\u5df2\u7ecf\u6ce8\u518c\u3002<\/h5>\n<pre class=\"post-pre\"><code>select * from {TABLE\u540d};\r\n<\/code><\/pre>\n<p>\u5982\u679c\u65e0\u6cd5\u4f7f\u7528select\uff0c\u8bf7\u5c1d\u8bd5\u4f7f\u7528\u5927\u5199\u7684SELECT\u6765\u6267\u884c\uff08\u4e5f\u8bb8\u662f\u5fc3\u60c5\u95ee\u9898\uff0c\u6709\u65f6\u5019\u4f7f\u7528\u5c0f\u5199\u548c\u5927\u5199\u5b57\u6bcd\u4e0d\u540c\uff09\u3002\u5982\u679c\u5728\u6b65\u9aa44\u4e2d\u663e\u793a\u4e86\u6ce8\u518c\u7684\u6570\u636e\uff0c\u8868\u793a\u5b8c\u6210\u3002<\/p>\n<h5>6. \u786e\u8ba4 VPS \u7684 PostgreSQL \u662f\u5426\u6b63\u786e\u540c\u6b65\u4e86<\/h5>\n<h6>1. \u8fde\u63a5\u5230VPS\u4e0a\u7684PostgreSQL\u6570\u636e\u5e93\u3002<\/h6>\n<pre class=\"post-pre\"><code>psql -U {\u30e6\u30fc\u30b6\u30fc\u540d} -d {DB\u540d}\r\n<\/code><\/pre>\n<h6>\u786e\u8ba4\u6570\u636e\u5df2\u7ecf\u63d2\u5165\u3002<\/h6>\n<pre class=\"post-pre\"><code>SELECT * from {TABLE\u540d};\r\n<\/code><\/pre>\n<p>\u5982\u679c\u65e0\u6cd5\u4f7f\u7528SELECT\uff0c\u8bf7\u5c1d\u8bd5\u4f7f\u7528\u5c0f\u5199\u7684select\uff08\u53ef\u80fd\u662f\u5fc3\u60c5\u95ee\u9898\uff0c\u6709\u65f6\u5019\u662f\u5c0f\u5199\uff0c\u6709\u65f6\u5019\u662f\u5927\u5199\uff09<br \/>\n\u5982\u679c\u80fd\u591f\u786e\u8ba4\u4e4b\u524d\u63d2\u5165\u7684\u6570\u636e\uff0c\u5c31\u5b8c\u6210\u4e86\u3002<\/p>\n<h4>2. Springboot\u7684\u914d\u7f6e<\/h4>\n<h5>1. \u66f4\u6539application.properties\u6587\u4ef6<\/h5>\n<pre class=\"post-pre\"><code>spring.jpa.database=POSTGRESQL\r\nspring.datasource.url=jdbc:postgresql:\/\/{VPS\u306eIP\u30a2\u30c9\u30ec\u30b9}:5432\/{DB\u540d}\r\nspring.datasource.username={\u30e6\u30fc\u30b6\u30fc\u540d}\r\nspring.datasource.password={\u30d1\u30b9\u30ef\u30fc\u30c9}\r\n<\/code><\/pre>\n<h5>2. \u6dfb\u52a0\u4f9d\u8d56\u5173\u7cfb<\/h5>\n<p>pom.xml -&gt; \u9879\u76ee\u5bf9\u8c61\u6a21\u578b\u6587\u4ef6<\/p>\n<pre class=\"post-pre\"><code>&lt;dependency&gt;\r\n\t&lt;groupId&gt;org.mybatis.spring.boot&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;mybatis-spring-boot-starter&lt;\/artifactId&gt;\r\n\t&lt;version&gt;3.0.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;org.postgresql&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;postgresql&lt;\/artifactId&gt;\r\n    &lt;scope&gt;runtime&lt;\/scope&gt;\r\n&lt;\/dependency&gt;\r\n<\/code><\/pre>\n<p>\u203b\u6b64\u6b21\u4f7f\u7528\u4e86Mybatis\uff0c\u4f46\u4e5f\u53ef\u4ee5\u4f7f\u7528JPA\u3002<\/p>\n<h5>\u521b\u5efa Model \u7c7b\u3002<\/h5>\n<p>\u6a21\u578b\uff1a\u4e3a\u4e86\u5c06\u6570\u636e\u5e93\u6570\u636e\u4f5c\u4e3aJava\u7c7b\u5904\u7406\u800c\u5fc5\u9700<\/p>\n<pre class=\"post-pre\"><code>@Getter\r\n@Setter\r\npublic class Test {\r\n    private Long id;\r\n    private String name;\r\n}\r\n<\/code><\/pre>\n<h5>\u521b\u5efa\u5b58\u50a8\u5e93<\/h5>\n<p>\u5b58\u50a8\u5e93\uff1a\u7528\u4e8e\u4e0e\u5b9e\u9645\u6570\u636e\u5e93\u4ea4\u4e92\u7684\u63a5\u53e3\u3002<\/p>\n<pre class=\"post-pre\"><code>@Mapper\r\npublic interface TestMapper {\r\n    @Select(\"SELECT * FROM testTable\")\r\n    List&lt;Test&gt; selectAll();\r\n}\r\n<\/code><\/pre>\n<h5>\u521b\u5efaservice\u7c7b<\/h5>\n<p>\u670d\u52a1\uff1a\u7c7b\u4f3c\u4e8e\u63a7\u5236\u5668\u548c\u5b58\u50a8\u5e93\u4e4b\u95f4\u7684\u6865\u6881\u89d2\u8272<\/p>\n<pre class=\"post-pre\"><code>@RequiredArgsConstructor\r\n@Transactional\r\n@Service\r\npublic class TestService {\r\n    private final TestMapper mapper;\r\n    public List&lt;Test&gt; selectAll() {\r\n        return mapper.selectAll();\r\n    }\r\n}\r\n<\/code><\/pre>\n<h5>6. \u521b\u5efa\u4e00\u4e2a\u63a7\u5236\u5668\u7c7b\u3002<\/h5>\n<p>\u63a7\u5236\u8005\u89d2\u8272\uff1a\u6b64\u5904\u63a5\u6536\u7528\u6237\u8bf7\u6c42\uff0c\u5e76\u6839\u636e\u8bf7\u6c42\u5185\u5bb9\u8c03\u7528\u670d\u52a1\u7c7b\u7684\u5904\u7406\u3002<\/p>\n<pre class=\"post-pre\"><code>@RequiredArgsConstructor\r\n@Controller\r\npublic class TestController {\r\n    private final TestService service;\r\n    @GetMapping(\"\/list\")\r\n    public ModelAndView testList(ModelAndView mav) {\r\n        mav.addObject(\"page\", service.selectAll());\r\n        mav.setViewName(\"list\");\r\n        return mav;\r\n    }\r\n}\r\n<\/code><\/pre>\n<h5>7. \u5236\u4f5cHTML<\/h5>\n<pre class=\"post-pre\"><code>&lt;!DOCTYPE html&gt;\r\n&lt;html xmlns:th=\"http:\/\/www.thymeleaf.org\"&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=\"UTF-8\"&gt;\r\n&lt;title&gt;list&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n    &lt;table&gt;\r\n        &lt;tr th:each=\"list : ${page}\" th:object=\"${list}\"&gt;\r\n            &lt;td th:text=\"*{id}\"&gt;&lt;\/td&gt;\r\n            &lt;td th:text=\"*{name}\"&gt;&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n    &lt;\/table&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/code><\/pre>\n<p>\u203b \u4f5c\u4e3a\u5907\u5fd8\u5f55,<br \/>\n\u5728${page}\u4e0a\u662f\u7531Controller\u7684mav.addObject\u6307\u5b9a\u7684service.selectAll()(\u83b7\u53d6\u6240\u6709\u6570\u636e)\u3002<br \/>\nth:each\u7528\u4e8e\u5c06page\u7684\u5185\u5bb9\u9010\u4e2a\u653e\u5165list\u4e2d\uff08\u7c7b\u4f3c\u4e8eJava\u4e2d\u7684for(String list : page)\uff09\u3002<br \/>\nth:object\u5c06\u7ed1\u5b9a\u5230\u8868\u5355\u7684\u5bf9\u8c61\u6307\u5b9a\u4e3a${list}\u3002<br \/>\n\u2192\u5982\u679c\u4e0d\u4f7f\u7528th:object\uff0c\u5219\u4f1a\u53d8\u6210\u4ee5\u4e0b\u65b9\u5f0f\u3002<\/p>\n<pre class=\"post-pre\"><code>        &lt;tr th:each=\"list : ${page}\"&gt;\r\n            &lt;td th:text=\"*{list.id}\"&gt;&lt;\/td&gt;\r\n            &lt;td th:text=\"*{list.name}\"&gt;&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n<\/code><\/pre>\n<h5>8. \u5728\u672c\u5730\u8fdb\u884c\u64cd\u4f5c\u9a8c\u8bc1<\/h5>\n<h4>3. \u5220\u9664TABLE<\/h4>\n<p>\u5982\u679c\u4e0d\u9700\u8981 TABLE\uff0c\u8bf7\u5728\u8fde\u63a5\u5230 PostgreSQL \u540e\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5220\u9664\u3002<\/p>\n<pre class=\"post-pre\"><code>drop table \"{TABLE\u540d}\";\r\n<\/code><\/pre>\n<h3>\u9519\u8bef\u89e3\u51b3<\/h3>\n<p>ERROR: type &#8220;varcher&#8221; does not exist<br \/>\nVARCHAR\u306f\u5927\u6587\u5b57\u306b\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044<\/p>\n<p>drop table {TABLE\u540d};\u3068\u3084\u308b\u3068ERROR: syntax error at or near &#8220;DROP&#8221;\u304c\u51fa\u3066\u524a\u9664\u3067\u304d\u306a\u3044<br \/>\ndrop table &#8220;{TABLE\u540d}&#8221;;\u3068TABLE\u540d\u3092\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u56f2\u3093\u3067\u3042\u3052\u308b\u3002<\/p>\n<p>VPS\u3067postgreSQL\u306b\u63a5\u7d9a\u3057\u305f\u3068\u304d\u306bpsql: error: connection to server on socket &#8220;\/var\/run\/postgresql\/.s.PGSQL.5432&#8243;\u306e\u30a8\u30e9\u30fc<br \/>\nsudo vi \/var\/lib\/pgsql\/14\/data\/pg_hba.conf\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63<\/p>\n<pre class=\"post-pre\"><code>\u4fee\u6b63\u524d\r\n# \"local\" is for Unix domain socket connections only\r\nlocal   all             all                                     peer\r\n\r\n\u4fee\u6b63\u5f8c\r\n# \"local\" is for Unix domain socket connections only\r\nlocal   all             all                                     trust\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">local\u3067\u52d5\u4f5c\u78ba\u8a8d\u3057\u305f\u3089internal server error\u304c\u51fa\u308b<\/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\">\u304a\u305d\u3089\u304fapplicaion.properties\u306b\u8a18\u8f09\u3057\u3066\u3044\u308b\u5185\u5bb9\u304c\u3069\u3053\u304b\u9593\u9055\u3063\u3066\u3044\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">(\u81ea\u5206\u306fpw\u9593\u9055\u3063\u3066\u3044\u3066\u30a8\u30e9\u30fc\u51fa\u305f)<\/ul>\n<h3>\u8bf7\u63d0\u4f9b\u5177\u4f53\u7684\u53e5\u5b50\u6216\u6bb5\u843d\uff0c\u6211\u5c06\u4e3a\u60a8\u8fdb\u884c\u7ffb\u8bd1\u3002<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">https:\/\/uha-blog.com\/java\/spring-boot-postgresql\/<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">https:\/\/www.koikikukan.com\/archives\/2020\/06\/03-235555.php<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u603b\u7ed3 \u5c1d\u8bd5\u8fde\u63a5\u5148\u524d\u5728VPS\u4e0a\u5efa\u7acb\u7684postgreSQL\u548cspringboot\uff0c\u4ee5\u83b7\u53d6\u6570\u636e\u3002 \u73af\u5883 Spring [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-41842","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>\u5c1d\u8bd5\u8fde\u63a5Springboot\u548cpostgreSQL\u4ee5\u83b7\u53d6\u6570\u636e - 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\/\u5c1d\u8bd5\u8fde\u63a5springboot\u548cpostgresql\u4ee5\u83b7\u53d6\u6570\u636e\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5c1d\u8bd5\u8fde\u63a5Springboot\u548cpostgreSQL\u4ee5\u83b7\u53d6\u6570\u636e\" \/>\n<meta property=\"og:description\" content=\"\u603b\u7ed3 \u5c1d\u8bd5\u8fde\u63a5\u5148\u524d\u5728VPS\u4e0a\u5efa\u7acb\u7684postgreSQL\u548cspringboot\uff0c\u4ee5\u83b7\u53d6\u6570\u636e\u3002 \u73af\u5883 Spring [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u8fde\u63a5springboot\u548cpostgresql\u4ee5\u83b7\u53d6\u6570\u636e\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-26T01:32:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T20:06:52+00:00\" \/>\n<meta name=\"author\" content=\"\u79d1, \u96c5\" \/>\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, \u96c5\" \/>\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\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/\",\"name\":\"\u5c1d\u8bd5\u8fde\u63a5Springboot\u548cpostgreSQL\u4ee5\u83b7\u53d6\u6570\u636e - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-06-26T01:32:38+00:00\",\"dateModified\":\"2024-04-29T20:06:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5c1d\u8bd5\u8fde\u63a5Springboot\u548cpostgreSQL\u4ee5\u83b7\u53d6\u6570\u636e\"}]},{\"@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\/41e222757cdd2a3365361328bd79970a\",\"name\":\"\u79d1, \u96c5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u96c5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5c1d\u8bd5\u8fde\u63a5Springboot\u548cpostgreSQL\u4ee5\u83b7\u53d6\u6570\u636e - 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\/\u5c1d\u8bd5\u8fde\u63a5springboot\u548cpostgresql\u4ee5\u83b7\u53d6\u6570\u636e\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5c1d\u8bd5\u8fde\u63a5Springboot\u548cpostgreSQL\u4ee5\u83b7\u53d6\u6570\u636e","og_description":"\u603b\u7ed3 \u5c1d\u8bd5\u8fde\u63a5\u5148\u524d\u5728VPS\u4e0a\u5efa\u7acb\u7684postgreSQL\u548cspringboot\uff0c\u4ee5\u83b7\u53d6\u6570\u636e\u3002 \u73af\u5883 Spring [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u8fde\u63a5springboot\u548cpostgresql\u4ee5\u83b7\u53d6\u6570\u636e\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-06-26T01:32:38+00:00","article_modified_time":"2024-04-29T20:06:52+00:00","author":"\u79d1, \u96c5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u96c5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/","name":"\u5c1d\u8bd5\u8fde\u63a5Springboot\u548cpostgreSQL\u4ee5\u83b7\u53d6\u6570\u636e - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-06-26T01:32:38+00:00","dateModified":"2024-04-29T20:06:52+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5c1d\u8bd5\u8fde\u63a5Springboot\u548cpostgreSQL\u4ee5\u83b7\u53d6\u6570\u636e"}]},{"@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\/41e222757cdd2a3365361328bd79970a","name":"\u79d1, \u96c5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","caption":"\u79d1, \u96c5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e8%bf%9e%e6%8e%a5springboot%e5%92%8cpostgresql%e4%bb%a5%e8%8e%b7%e5%8f%96%e6%95%b0%e6%8d%ae%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41842","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\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=41842"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41842\/revisions"}],"predecessor-version":[{"id":89579,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41842\/revisions\/89579"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=41842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=41842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=41842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}