将EJB注入JAX-RS(RESTful服务)
null
NullPointerException
@Path("book")public class BookResource { @EJB private BookEJB bookEJB; public BookResource() { } @GET @Produces("application/xml") @Path("/{bookId}") public Book getBookById(@PathParam("bookId") Integer id) { return bookEJB.findById(id); }}
慕婉清6462132
相关分类