项目作者: marcnuri-demo

项目描述 :
Spring Boot using EclipseLink
高级语言: Java
项目地址: git://github.com/marcnuri-demo/spring-boot-eclipselink.git
创建时间: 2020-06-27T05:07:40Z
项目社区:https://github.com/marcnuri-demo/spring-boot-eclipselink

开源协议:Apache License 2.0

下载


Spring Data JPA + EclipseLink: Configuring Spring-Boot to use EclipseLink as the JPA provider

Source code for tutorial published on https://blog.marcnuri.com/spring-data-jpa-eclipselink-configuring-spring-boot-to-use-eclipselink-as-the-jpa-provider/

Simple Spring Boot application that uses EclipseLink as the JPA provider (see
CustomJpaConfiguraton).

To run the application:
```shell script
$ ./gradlew bootRun

  1. Once the application is running you can test the provided endpoints:
  2. ```shell script
  3. $ curl -s localhost:8080/mounts | jq
  4. [
  5. {
  6. "id": "E08A6EFD-E208-42BC-83CC-0AFE5408783F",
  7. "alias": "everest",
  8. "name": "Mount Everest"
  9. },
  10. {
  11. "id": "30CAB297-B27A-4D79-BF04-EEF9ACA09EB8",
  12. "alias": "k2",
  13. "name": "K2"
  14. },
  15. {
  16. "id": "DADB5D54-54E3-4AFD-A1CC-E563FCE34678",
  17. "alias": "aitana",
  18. "name": "Aitana"
  19. }
  20. ]

shell script $ curl -s localhost:8080/climbers | jq [ { "id": "12EED719-7A08-4620-9ADF-7A1FD233FFD1", "name": "Alex", "climbedMounts": [ { "id": "E08A6EFD-E208-42BC-83CC-0AFE5408783F", "alias": "everest", "name": "Mount Everest" }, { "id": "DADB5D54-54E3-4AFD-A1CC-E563FCE34678", "alias": "aitana", "name": "Aitana" } ], "phoneNumbers": [ { "id": "043772AA-495C-412B-AFC4-6BF3F918C756", "number": "+00 123 45 78" } ] }, { "id": "114970D3-67F0-41EF-B328-CAA7B5EEA5C9", "name": "Charles", "climbedMounts": [ { "id": "30CAB297-B27A-4D79-BF04-EEF9ACA09EB8", "alias": "k2", "name": "K2" }, { "id": "E08A6EFD-E208-42BC-83CC-0AFE5408783F", "alias": "everest", "name": "Mount Everest" } ], "phoneNumbers": [ { "id": "3E90D601-F2FE-4B6D-883C-A53DB6005AC6", "number": "+11 555 13 37" } ] }, { "id": "E37222EF-6FF9-452D-AACF-E8C8E306C8B1", "name": "Julia", "climbedMounts": [ { "id": "30CAB297-B27A-4D79-BF04-EEF9ACA09EB8", "alias": "k2", "name": "K2" }, { "id": "E08A6EFD-E208-42BC-83CC-0AFE5408783F", "alias": "everest", "name": "Mount Everest" } ], "phoneNumbers": [] } ]