You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2018/12/28 15:37:50 UTC

[GitHub] Sc0rpic0m opened a new pull request #1: Added API for context aware config resource injection.

Sc0rpic0m opened a new pull request #1: Added API for context aware config resource injection.
URL: https://github.com/apache/sling-org-apache-sling-caconfig-api/pull/1
 
 
   Makes the following possible:
   
   `@model(adaptables = {SlingHttpServletRequest.class, Resource.class}, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
   public class SampleModel {
   
   @Via(type= ContextAwareConfigResource.class, value = "config")
   @ValueMapValue
   private String propertyTest;
   
   public String getPropertyTest() {
       return propertyTest;
   }
   }`
   
   Use via to point to context aware config resource, to inject valuemap values.
   Tested it locally and works fine with latest versions.
   What do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services