I am trying to get Sling Models working.
I have a simple annotated POJO that maps to a JCR Node by convention as follows:
@Model(adaptables=Resource.class)
public class FlushRule {
@Inject
public String optingRegex;
}
I have set a String value in optingRegex.
When I try to use it:
FlushRule currentRule=rule.adaptTo(FlushRule.class);
Although the correct object is in rule, currentRule is null.
I looked in
http://localhost:4502/system/console/adapters
and couldn't find any adapters.
Any tips would be appreciated.