sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] Sc0rpic0m opened a new pull request #1: Added API for context aware config resource injection.
Date Fri, 28 Dec 2018 15:37:50 GMT
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

Mime
View raw message