package <%=@package%>.integration.<%=@model_name.downcase%>; <%=@licence%> import <%=@package%>.model.<%=@model_name%>; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.MongoOperations; import org.springframework.stereotype.Component; @Component public class <%=@model_name%>SampleData { @Autowired MongoOperations mongoOperations; public void seed() { for (int i = 0; i < 10; i++) { <%=@model_name%> b = new <%=@model_name%>(); b.setId(String.valueOf(i)); mongoOperations.save(b); } } public void destroy() { mongoOperations.dropCollection("<%=@model_name%>"); } }