Skip to content

Commit df9bed7

Browse files
committed
add an entity, repository and springdoc-openapi-starter-webmvc-ui:2.8.1
repro sample for springdoc/springdoc-openapi#2846
1 parent 5c50956 commit df9bed7

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ repositories {
1818
}
1919

2020
dependencies {
21+
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.1'
2122
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
2223
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
2324
implementation 'org.springframework.boot:spring-boot-starter-web'
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.example.demo;
2+
3+
import jakarta.persistence.*;
4+
5+
@Entity
6+
public class Foo {
7+
@Id
8+
@GeneratedValue(strategy = GenerationType.SEQUENCE)
9+
@Column(nullable = false)
10+
private Long id;
11+
12+
public Long getId() {
13+
return id;
14+
}
15+
16+
public void setId(Long id) {
17+
this.id = id;
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.example.demo;
2+
3+
import org.springframework.data.jpa.repository.JpaRepository;
4+
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
5+
6+
@RepositoryRestResource
7+
public interface FooRepository extends JpaRepository<Foo, Long> {
8+
}

0 commit comments

Comments
 (0)