My domain layer is as follows:
@Resource(uri='/product') class BasicProduct { String title String description Double price Date creationDate Date changedDate static constraints = {
My Bootstrap.groovy contains this code:
class BootStrap { def init = { servletContext -> new BasicProduct(title: "Product1", description:"blblblblbalablablalbalbablablablablblabalalbllba", price:5).save() new BasicProduct(title: "Product2", description:"blblblblbalablablalbalbablablablablblabalalbllba", price:75).save() new BasicProduct(title: "Product3", description:"blblblblbalablablalbalbablablablablblabalalbllba", price:50).save() new BasicProduct(title: "Product4", description:"blblblblbalablablalbalbablablablablblabalalbllba", price:25).save() new BasicProduct(title: "Product5", description:"blblblblbalablablalbalbablablablablblabalalbllba", price:15).save() println "initializing data..." }
However, when I open the URL \product , I do not see any data.
Any ideas why?
I appreciate your answer!
source share