问题
Can @Stateless class have different modifiers than public? In documentation I have only found constraints of constructor/methods visibility, but nothing interesting about class level access.
回答1:
According to ejb3-1 specification:
4.9.2 Session Bean Class
The following are the requirements for the session bean class:
• The class must be defined as public, must not be final, and must not be abstract. The class must be a top level class
来源:https://stackoverflow.com/questions/25867608/does-ejb-stateless-class-has-to-be-public