Compilation errors when trying to use sling model in my html
I have created a new component and when i try to use the sling model using data-sly-use
i get the below error , is there any reason for this error?
org.apache.sling.scripting.sightly.SightlyException: Compilation errors in org/apache/sling/scripting/sightly/apps/myproject/components/content/components/demo__component/demo__002d__component__002e__html.java: Line 39, column 1932 : com.myproject.core.slingmodels.components.democomponent.DemoComponentModel cannot be resolved to a type
This is my sling model
package com.myproject.core.slingmodels.components.democomponent;
import com.myproject.core.slingmodels.HeaderModel;
import lombok.Getter;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.models.annotations.DefaultInjectionStrategy;
import org.apache.sling.models.annotations.Model;
import org.apache.sling.models.annotations.injectorspecific.ChildResource;
@Getter
@Model(adaptables = Resource.class,
defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
public class DemoComponentModel {
@ChildResource
private HeaderModel Heading;
}
