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

Improve configurability in Pippo via DI #554

Open
decebals opened this issue Jul 2, 2020 · 0 comments
Open

Improve configurability in Pippo via DI #554

decebals opened this issue Jul 2, 2020 · 0 comments

Comments

@decebals
Copy link
Member

decebals commented Jul 2, 2020

For example now, I have in Application class methods as:

  • setTemplateEngine
  • setRouter

My idea is to add as dependency the tiny inject-api library in pom.xml (probably with scope provided):

<!-- https://mvnrepository.com/artifact/javax.inject/javax.inject -->
<dependency>
    <groupId>javax.inject</groupId>
    <artifactId>javax.inject</artifactId>
    <version>1</version>
</dependency>

and add @Inject annotation on all setter methods that are possible extensions points in Pippo.

In this mode we can configure completely Pippo using a DI container as Spring Framework or Guice.

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

No branches or pull requests

1 participant