Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TestPage extends Page {
- private A a;
- @Inject
- public void setA(A a) {
- this.a = a;
- }
- }
- public class A {
- @Inject
- public A (CatadvisorProperties properties) {
- System.out.println("test");
- }
- }
- @Singleton
- public class CatadvisorProperties extends Properties {
- @Inject
- public CatadvisorProperties() {
- super();
- try {
- final InputStream inStream = this.getClass().getClassLoader().getResourceAsStream("catadvisor.properties");
- try {
- load(inStream);
- } finally {
- inStream.close();
- }
- } catch (IOException e) {
- throw new InvalidConfigurationException("error loading properties file", e);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement