|
|
|
|
|
|
I posted this issue on Stack Overflow ( http://stackoverflow.com/questions/30258300/is-it-possible-to-annotated-the-interface-for-a-method-validation-using-beanvali?noredirect=1#comment48695870_30258300 ).
I have a structure in which a class implements an interface. The bean validation is defined on the interface, but the validation is not triggered. If I change the interface to be an abstract class, the validation works.
{code:java} @Stateless public class MyBean implements MyInterface{ public String lookup(@NotNull String text){ return "found3"; } } {code}
{code:java} public interface MyInterface { public String lookup(@NotNull String text); } {code}
{code:java} public class HelloWorld { @Inject private MyInterface bean;
public String getMessage() { return bean.lookup(null); } } {code}
I am attaching two zip files containing two versions of the project, one version with interface and the second with abstract class (this is the only difference between both).
Is there anything I can do to provide more information? (There is no message in the log)
|
|
|
|
|
|