Spring HATEOAS

Spring HATEOAS - 支持实现超文本驱动的 REST web 服务表示法的库。「Spring HATEOAS - Library to support implementing representations for hyper-text driven REST web services.」

  • 所有者: spring-projects/spring-hateoas
  • 平台: Windows,Linux,Mac,Docker
  • 許可證: Apache License 2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

image:https://spring.io/badges/spring-hateoas/ga.svg[link=https://spring.io/projects/spring-hateoas]
image:https://spring.io/badges/spring-hateoas/snapshot.svg[link=https://spring.io/projects/spring-hateoas]
image:https://badges.gitter.im/spring-projects/spring-hateoas.png[link=https://gitter.im/spring-projects/spring-hateoas]

image:https://jenkins.spring.io/buildStatus/icon?job=spring-hateoas%2Fmain&subject=main[link=https://jenkins.spring.io/view/SpringHATEOAS/job/spring-hateoas/]
image:https://jenkins.spring.io/buildStatus/icon?job=spring-hateoas%2F1.2.x&subject=1.2.x[link=https://jenkins.spring.io/view/SpringHATEOAS/job/spring-hateoas/]
image:https://jenkins.spring.io/buildStatus/icon?job=spring-hateoas%2F1.1.x&subject=1.1.x[link=https://jenkins.spring.io/view/SpringHATEOAS/job/spring-hateoas/]
image:https://jenkins.spring.io/buildStatus/icon?job=spring-hateoas%2F1.0.x&subject=1.0.x[link=https://jenkins.spring.io/view/SpringHATEOAS/job/spring-hateoas/]
image:https://jenkins.spring.io/buildStatus/icon?job=spring-hateoas%2F0.25.x&subject=0.25.x[link=https://jenkins.spring.io/view/SpringHATEOAS/job/spring-hateoas/]

= Spring HATEOAS

This project provides some APIs to ease creating REST representations that follow the https://en.wikipedia.org/wiki/HATEOAS[HATEOAS] principle when working with Spring and especially Spring MVC. The core problem it tries to address is link creation and representation assembly.

== Working with Spring HATEOAS

Since all commits are headlined with its github issue, git will treat it as a comment. To get around this, apply the following configuration to your clone:

[source]

git config core.commentchar "/"

== Making a release

  1. Create a new release (on the main branch).

% ci/create-release.sh

  1. With the release tagged, push the tagged version to the release branch.

% git checkout -b release
% git reset --hard
% git push -f origin release

NOTE: You can chain the previous set of commands together using &&.

The pipeline will build and release the "release" branch. It will also build a new snapshot and stage it on artifactory.
And if it's a .RELEASE, the pipeline will push it out to Maven Central. To complete a release on Maven Central, you must login
to the server shown in pom.xml, close, and release. This is a stop gap to guard against bad releases accidentally getting pushed
out to Maven Central.

=== Running CI tasks locally

Since the pipeline uses Docker, it's easy to:

  • Debug what went wrong on your local machine.
  • Test out a a tweak to your test.sh script before sending it out.
  • Experiment against a new image before submitting your pull request.

All of these use cases are great reasons to essentially run what Jenkins does on your local machine.

IMPORTANT: To do this you must have Docker installed on your machine.

  1. docker run -it --mount type=bind,source="$(pwd)",target=/spring-hateoas-github adoptopenjdk/openjdk8:latest /bin/bash

This will launch the Docker image and mount your source code at spring-hateoas-github.
+
2. cd spring-hateoas-github
+
Next, run the test.sh script from inside the container:
+
2. PROFILE=none ci/test.sh

Since the container is binding to your source, you can make edits from your IDE and continue to run build jobs.

If you need to test the build.sh script, then do this:

  1. docker run -it --mount type=bind,source="$(pwd)",target=/spring-hateoas-github --mount type=bind,source="/tmp/spring-hateoas-artifactory",target=/spring-hateoas-artifactory adoptopenjdk/openjdk8:latest /bin/bash

This will launch the Docker image and mount your source code at spring-hateoas-github and the temporary
artifactory output directory at spring-hateoas-artifactory.
+
Next, run the build.sh script from inside the container:
+
2. ci/build.sh

IMPORTANT: build.sh will attempt to push to Artifactory. If you don't supply credentials, it will fail.

NOTE: Docker containers can eat up disk space fast! From time to time, run docker system prune to clean out old images.

== Resources

主要指標

概覽
名稱與所有者spring-projects/spring-hateoas
主編程語言Java
編程語言Java (語言數: 3)
平台
許可證Apache License 2.0
所有者活动
創建於2012-05-07 15:18:47
推送於2025-07-08 12:20:54
最后一次提交
發布數148
最新版本名稱2.5.1 (發布於 2025-06-12 18:46:57)
第一版名稱0.1.0.RELEASE (發布於 )
用户参与
星數1.1k
關注者數102
派生數472
提交數1.4k
已啟用問題?
問題數1900
打開的問題數240
拉請求數80
打開的拉請求數29
關閉的拉請求數315
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?