1 Reply Latest reply on Feb 29, 2016 8:54 AM by Martin Kouba

    Use of @Parameters in WELD-SE,

    Karlheinz Alber Newbie

      1. starting the container and passing something as arg.

       

      public class Bootstrapping {

           public static void main(String[] args) {

              Weld weld = new Weld();

              try (WeldContainer container = weld.initialize()) {

              }

      }

       

      2. Inject @Paramters in my HelloWorld, but  is null.

       

      @ApplicationScoped

      public class HelloWorld {

          @Inject

          @Parameters

          List<String> params;

          public void printHello(@Observes ContainerInitialized event) {

       

       

              System.out.println(String.format("Hello i have %d args", params.size));

          }

      }


      My question is, is @Parameters referring to args ?


      Or @Parameters a readed from a config.xml file ?