Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Commit 366d81c

Browse files
committed
Add new tutorial "Hello REST Repository"
1 parent c90887e commit 366d81c

File tree

5 files changed

+105
-0
lines changed

5 files changed

+105
-0
lines changed

hello-rest-repository/.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
4+
### STS ###
5+
.apt_generated
6+
.classpath
7+
.factorypath
8+
.project
9+
.settings
10+
.springBeans
11+
.sts4-cache
12+
13+
### IntelliJ IDEA ###
14+
.idea
15+
*.iws
16+
*.iml
17+
*.ipr
18+
19+
### NetBeans ###
20+
/nbproject/private/
21+
/build/
22+
/nbbuild/
23+
/dist/
24+
/nbdist/
25+
/.nb-gradle/

hello-rest-repository/pom.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<artifactId>hello-rest-repository</artifactId>
5+
<version>0.0.1-SNAPSHOT</version>
6+
<packaging>jar</packaging>
7+
<parent>
8+
<artifactId>spring-boot-tutorial</artifactId>
9+
<groupId>com.bobocode</groupId>
10+
<version>1.0-SNAPSHOT</version>
11+
</parent>
12+
<modelVersion>4.0.0</modelVersion>
13+
14+
<dependencies>
15+
<dependency>
16+
<groupId>org.springframework.boot</groupId>
17+
<artifactId>spring-boot-starter-data-jpa</artifactId>
18+
</dependency>
19+
<dependency>
20+
<groupId>org.springframework.boot</groupId>
21+
<artifactId>spring-boot-starter-data-rest</artifactId>
22+
</dependency>
23+
<dependency>
24+
<groupId>org.springframework.boot</groupId>
25+
<artifactId>spring-boot-starter-web</artifactId>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.springframework.data</groupId>
29+
<artifactId>spring-data-rest-hal-browser</artifactId>
30+
</dependency>
31+
32+
<dependency>
33+
<groupId>com.h2database</groupId>
34+
<artifactId>h2</artifactId>
35+
<scope>runtime</scope>
36+
</dependency>
37+
<dependency>
38+
<groupId>org.springframework.boot</groupId>
39+
<artifactId>spring-boot-starter-test</artifactId>
40+
<scope>test</scope>
41+
</dependency>
42+
43+
<dependency>
44+
<groupId>com.bobocode</groupId>
45+
<artifactId>spring-boot-tutorial-util</artifactId>
46+
<version>1.0-SNAPSHOT</version>
47+
</dependency>
48+
</dependencies>
49+
50+
<build>
51+
<plugins>
52+
<plugin>
53+
<groupId>org.springframework.boot</groupId>
54+
<artifactId>spring-boot-maven-plugin</artifactId>
55+
</plugin>
56+
</plugins>
57+
</build>
58+
59+
60+
</project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.bobocode;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class HelloRestRepositoryApplication {
8+
9+
public static void main(String[] args) {
10+
SpringApplication.run(HelloRestRepositoryApplication.class, args);
11+
}
12+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.bobocode.jpa;
2+
3+
4+
import com.bobocode.model.Account;
5+
import org.springframework.data.jpa.repository.JpaRepository;
6+
7+
public interface AccountRepository extends JpaRepository<Account, Long> {
8+
}

hello-rest-repository/src/main/resources/application.properties

Whitespace-only changes.

0 commit comments

Comments
 (0)