File tree 3 files changed +28
-0
lines changed
src/main/java/com/example/demo
3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ repositories {
18
18
}
19
19
20
20
dependencies {
21
+ implementation ' org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.1'
21
22
implementation ' org.springframework.boot:spring-boot-starter-data-jpa'
22
23
implementation ' org.springframework.boot:spring-boot-starter-data-rest'
23
24
implementation ' org.springframework.boot:spring-boot-starter-web'
Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments