You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Autowiring the {{o.s.d.g.GemfireTemplate}} as per the documentation does not work as documented.
Seems it has to do with the lazy initialization of the Region. If the Repository is annotated wit DependsOn("Customers"), then the problem is resolved.
@Repository
public class DemoRepository {
@Autowired
@Qualifier("customersTemplate")
private GemfireTemplate customersTemplate;
public void putData(String key, String value) {
customersTemplate.put(key, value);
}
}
Fails with:
Description:
Field customersTemplate in com.example.demo.client.repo.DemoRepository required a bean of type 'org.springframework.data.gemfire.GemfireTemplate' that could not be found.
Action:
Consider defining a bean of type 'org.springframework.data.gemfire.GemfireTemplate' in your configuration.