Skip to content

Instantly share code, notes, and snippets.

@theopendle
Created June 21, 2020 14:47
Show Gist options
  • Select an option

  • Save theopendle/275fae7e46cdb0836bc716d14bba1d2e to your computer and use it in GitHub Desktop.

Select an option

Save theopendle/275fae7e46cdb0836bc716d14bba1d2e to your computer and use it in GitHub Desktop.
@Model(
adaptables = Resource.class,
adapters = TestModel.class,
resourceType = TestModelImpl.RESOURCE_TYPE
)
@Slf4j
public class TestModelImpl implements TestModel {
public static final String RESOURCE_TYPE = "demo/components/content/test";
@OSGiService
private FakeService fakeService;
@Getter
@Optional
private String output;
@PostConstruct
protected void init() {
output = fakeService.doSomething();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment