Skip to content
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

Katharsis + SpringBoot + Postgresql #459

Open
tr3mendous opened this issue Apr 17, 2018 · 0 comments
Open

Katharsis + SpringBoot + Postgresql #459

tr3mendous opened this issue Apr 17, 2018 · 0 comments

Comments

@tr3mendous
Copy link

tr3mendous commented Apr 17, 2018

Hello,
I can't understand how to connect my RestController to db, how i can send queries to db and get it's response?
I tried some ugly ways like this

    @RequestMapping(method = GET)
    @ResponseBody
    public ResourceList<TestEntity> getAllEntities() {
        TestEntityRepository repository = new TestEntityRepository();
        for (RegistryEntry entry : resourceRegistry.getResources()) {
             repository = (TestEntityRepository)entry.getResourceRepository(null).getResourceRepository();
        }
        return repository.findAll(new QuerySpec(TestEntity.class));
    }

and others. Could somebody help my with this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant