From ec786748f0f8baf39cc7db141c4c9c214570fdcf Mon Sep 17 00:00:00 2001 From: Robert McNees <86265089+robertmcnees@users.noreply.github.com> Date: Thu, 25 Jul 2024 07:40:11 -0400 Subject: [PATCH] Add Dependabot (#42) * Update README instructions This commit addresses several minor issues that exist in the README: - A different intro section was used that did not specify the need for Maven or Gradle, since the wrappers are being used. - The instructions on building a jar had the wrong artifact listed. Since building a jar is not required here and the testing instructions are a bit long, the jar section was removed. - Removed instructions about SpringBootApplication annotation, since this is not mentioned in the guide. - Removed links at the bottom of the page that result in a 404. - The project id was not set and the links were not rendering correctly. * Configure dependabot for project updates --- .github/dependabot.yml | 32 ++++++++++++++++++++++++++++++++ README.adoc | 25 +++++++++++++------------ complete/build.gradle | 3 ++- initial/build.gradle | 3 ++- 4 files changed, 49 insertions(+), 14 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e440161 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,32 @@ +version: 2 +updates: + + - package-ecosystem: "maven" + directories: + - "/initial" + - "/complete" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-patch"] + schedule: + interval: "monthly" + target-branch: "main" + groups: + guide-dependencies-maven: + patterns: + - "*" + + - package-ecosystem: "gradle" + directories: + - "/initial" + - "/complete" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-patch"] + schedule: + interval: "monthly" + target-branch: "main" + groups: + guide-dependencies-gradle: + patterns: + - "*" \ No newline at end of file diff --git a/README.adoc b/README.adoc index c0c768e..fb58529 100644 --- a/README.adoc +++ b/README.adoc @@ -3,6 +3,8 @@ :toc: :icons: font :source-highlighter: prettify +:project_id: gs-accessing-data-rest +:java_version: 17 This guide walks you through the process of creating an application that accesses relational JPA data through a link:/guides/gs/rest-hateoas[hypermedia-based] @@ -21,11 +23,7 @@ Neo4j], link:/guides/gs/accessing-gemfire-data-rest[Spring Data Gemfire], and link:/guides/gs/accessing-mongodb-data-rest[Spring Data MongoDB] as backend data stores, but those are not part of this guide. -== What You Need - -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/main/prereq_editor_jdk_buildtools.adoc[] - -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/main/how_to_complete_this_guide.adoc[] +include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/main/guide_introduction.adoc[] [[scratch]] == Starting with Spring Initializr @@ -89,8 +87,6 @@ value of `/persons`. Here you have also defined a custom query to retrieve a list of `Person` objects based on the `lastName`. You can see how to invoke it later in this guide. -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/main/spring-boot-application-new-path.adoc[] - Spring Boot automatically spins up Spring Data JPA to create a concrete implementation of the `PersonRepository` and configure it to talk to a back end in-memory database by using JPA. @@ -101,11 +97,18 @@ components link up to the Spring Data JPA backend. When you use Spring Boot, thi autoconfigured. If you want to investigate how that works, by looking at the `RepositoryRestMvcConfiguration` in Spring Data REST. -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/main/build_an_executable_jar_subhead.adoc[] +== Running the Application -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/main/build_an_executable_jar_with_both.adoc[] +You can now run the application by executing the main method in `AccessingDataRestApplication`. +You can run the program from your IDE, or by executing the following Gradle command in the project root directory: +``` +./gradlew bootRun +``` -Logging output is displayed. The service should be up and running within a few seconds. +Alternatively, you could use Maven to run the application using the command: +``` +./mvnw spring-boot:run +``` == Test the Application @@ -394,8 +397,6 @@ The following guides may also be helpful: * https://spring.io/guides/gs/accessing-data-mysql/[Accessing data with MySQL] * https://spring.io/guides/gs/accessing-neo4j-data-rest/[Accessing Neo4j Data with REST] * https://spring.io/guides/gs/consuming-rest/[Consuming a RESTful Web Service] -* https://spring.io/guides/gs/consuming-rest-angularjs/[Consuming a RESTful Web Service with AngularJS] -* https://spring.io/guides/gs/consuming-rest-jquery/[Consuming a RESTful Web Service with jQuery] * https://spring.io/guides/gs/securing-web/[Securing a Web Application] * https://spring.io/guides/tutorials/rest/[Building REST services with Spring] * https://spring.io/guides/gs/spring-boot/[Building an Application with Spring Boot] diff --git a/complete/build.gradle b/complete/build.gradle index 6688cce..efbcbef 100644 --- a/complete/build.gradle +++ b/complete/build.gradle @@ -1,9 +1,10 @@ plugins { id 'org.springframework.boot' version '3.3.0' - id 'io.spring.dependency-management' version '1.1.5' id 'java' } +apply plugin: 'io.spring.dependency-management' + group = 'com.example' version = '0.0.1-SNAPSHOT' sourceCompatibility = '17' diff --git a/initial/build.gradle b/initial/build.gradle index 6688cce..efbcbef 100644 --- a/initial/build.gradle +++ b/initial/build.gradle @@ -1,9 +1,10 @@ plugins { id 'org.springframework.boot' version '3.3.0' - id 'io.spring.dependency-management' version '1.1.5' id 'java' } +apply plugin: 'io.spring.dependency-management' + group = 'com.example' version = '0.0.1-SNAPSHOT' sourceCompatibility = '17'