Skip to content

Support Spring Data REST (DE-43) #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
<groupId>com.arangodb</groupId>
<artifactId>arangodb-spring-boot-starter</artifactId>
<version>3.4-0</version>
</dependency>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public static void main(final String... args) {
AQLRunner.class,
GeospatialRunner.class
};
System.exit(SpringApplication.exit(SpringApplication.run(runner, args)));
//System.exit(SpringApplication.exit(SpringApplication.run(runner, args)));
SpringApplication.run(runner, args);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.arangodb.spring.demo.controller;

import com.arangodb.spring.demo.entity.Character;
import com.arangodb.spring.demo.repository.CharacterRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/characters")
public class CharacterController {

@Autowired
private CharacterRepository repository;

@GetMapping
public List<Character> getAllCharacters() {
return (List<Character>) repository.findAll();
}
}

1 change: 1 addition & 0 deletions demo/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ arangodb.spring.data.user=root
arangodb.spring.data.password=test
arangodb.spring.data.hosts=172.28.0.1:8529
#logging.level.com.arangodb.internal.net.Communication=DEBUG