dependency injection - When using CDI in Java is the default constructor necessary? -


I'm looking at the code-base of the open source project, which uses the CDI, in most sections a deprecated non- ARGE constructor and A constructor has been annotated @ Inject is an example class in a remarkable project that has used this approach. So my question is whether we do not have any non-RG constructor, even if we have the constructor annotated @ inject ?

The following are the import and annotations in the linked class:

  import br .com.caelum.vraptor.Controller; ... import br.com.caelum.vraptor.routes.annotation.Routed; ... @Root @Controller Public Class Questions Controller {...}  

I have found @target (value = TYPE) @ documentation @ @ reseteton (value = routum) @tweetirip @ request public @interface controller

note < Code> @RequestScoped here annotation.

Request scope is a general scope (as well as the areas of application, session and conversation) and the Jebos Weld client proxy for normal scood beans. To be able to create a proxy, the weld requires the following:

The following Java types can not be proxied by the container:

  • The class that is a Private manufacturer with no parameters, and
  • ...

Source:

In other cases you do not need to No-arg default constructor (see).

Further links:


Comments

Popular posts from this blog

c++ - C/pp Sockets, recv()/send() works only under gdb -

GO: Serve static pages -

objective c - How to open front/back camera at the same time in iOS developing? -