Colleagues, hello! Is is possible to inject beans inside of class which is created via 'new' operator? For example:
public class TestClass implements Callback {
@Inject
TestClassRepository repository;
//just only methods...
}
And 'TestClass' is created from another class:
Flyway.configure().collbacks(new TestClass()).load();
I have an issue with this,because 'repository.anyMethods()' inside of TestClass creates 'NullPointer' exception. 'TestClassRepository' is marked with the '@ApplicationScoped' and '@Startup' annotations.