Hello,
I am planning to implement my application with the following layers:
Client -> REST(Resteasy) -> Business Logic Layer -> Data access layer -> DB
I am using Wildfly 10.1.0.Final
I am just confused on how the Business layer should be implemented in order to be injected, if so, into the REST service layer....
At the moment I have this:
@Path("/hello") @Produces({ "application/json" }) @Consumes({ "application/json" }) public class HelloWorld { public HelloWorld() {} @GET @Path("/world") public Message getHello(){ return new Message("Hello World!!"); }
Message class is not an Entity at the moment, can I just use my entities as the return type?
I am planning to implement my business layer using CDI Managed Beans, so for example if I have a business class MessageService , should I inject it inside my REST class HelloWorld ?
Is there some documentation, article or tutorial that can guide?
Thanks