Search code examples
securitydependency-injectionaspectjcdishiro

Using CDI except a Java Web Application


From Doc i m trying to learn Context and Dependency injection . In tutorials CDI seems can be only use in a Web application.Can i use CDI in a Java Console project ? And How? I added libraries like javax.enterprice.deploy and cdi-api.I m trying to test Apache Shiro i referenced this part of Balusc detailed tutorial but i need to manage this without JSF and web Appli


Solution

  • http://docs.jboss.org/weld/reference/1.1.5.Final/en-US/html_single/#d0e5335

    Yes, it can be used in an SE environment, though many of the scopes do not work, nor really make sense, in an SE environment.