如何使用 spring 原生 graalvm 使用 postgres 创建 Springboot 应用程序?
How to create Springboot App with postgres using spring native graalvm?
我正在尝试使用 spring boot 和 postgres 创建一个 CRUD 应用程序,连同 spring native.But 除了 [=11] 我找不到任何与之相关的适当文档=].
如何将它与 postgres 集成的部分,就是我正在寻找的 for.Thankyou
您可以像在标准 Spring 引导应用程序中一样使用 Spring 数据。根据应用程序的类型,您可以使用 Spring Data JDBC、Spring Data JPA(如果您需要 Hibernate 功能)或 Spring Data R2DBC(对于响应式应用程序) ).如果您 bootstrap 您的应用程序来自 start.spring.io,您可以直接从那里 select PostgreSQL 依赖项。
要开始使用 Spring 数据,您可以参考 Spring 网站上的指南:relational data access with Spring Data JDBC. It uses H2, but you can replace it with PostgreSQL. More details are available on the project documentation。
在我的 GitHub 上,您可以找到有关如何开始使用它的 example of Spring Boot application with a REST API, security, and data persistence with PostgreSQL. And packaged as a native executable through Spring Native. If you're new to Spring Native, I wrote an article。
我正在尝试使用 spring boot 和 postgres 创建一个 CRUD 应用程序,连同 spring native.But 除了 [=11] 我找不到任何与之相关的适当文档=].
如何将它与 postgres 集成的部分,就是我正在寻找的 for.Thankyou
您可以像在标准 Spring 引导应用程序中一样使用 Spring 数据。根据应用程序的类型,您可以使用 Spring Data JDBC、Spring Data JPA(如果您需要 Hibernate 功能)或 Spring Data R2DBC(对于响应式应用程序) ).如果您 bootstrap 您的应用程序来自 start.spring.io,您可以直接从那里 select PostgreSQL 依赖项。
要开始使用 Spring 数据,您可以参考 Spring 网站上的指南:relational data access with Spring Data JDBC. It uses H2, but you can replace it with PostgreSQL. More details are available on the project documentation。
在我的 GitHub 上,您可以找到有关如何开始使用它的 example of Spring Boot application with a REST API, security, and data persistence with PostgreSQL. And packaged as a native executable through Spring Native. If you're new to Spring Native, I wrote an article。