class FeedSeedJob {
def quoteService
def cronExpression = "1 0 0 * * ?"
def group = "QotdGroup"
def execute() {
def qotd = quoteService.getQotdQuote()
println "QOTD is ${qotd.content}"
}
}
I honestly don't know how it could be any easier.
class FeedSeedJob {
def quoteService
def cronExpression = "1 0 0 * * ?"
def group = "QotdGroup"
def execute() {
def qotd = quoteService.getQotdQuote()
println "QOTD is ${qotd.content}"
}
}
class FeedsController {
def rss = {
render(feedType:"rss", feedVersion:"2.0") {
title = "Q2OH >> Quote of Tomorrow"
link = "http://host:port/app/rss/feed"
description = "The Quote of Tomorrow"
Quote.findAllByQotdIsNotNull().each() { quote ->
entry("Quote for ${quote.qotd + 1}") {
link = "http://host:port/app/quote/display/${quote.id}"
author = quote.author
publishedDate = (java.util.Date) quote.qotd
quote.content // return the content
}
}
}
}
}
entry("Quote for ${quote.qotd}") {
svcadm enable network/ipfilterThen create an ipnat.conf file in the /etc/ipf directory with the following contents:
rdr xnf0 your.ip.add.ress/32 port 80 -> 127.0.0.1 port 8080 tcp
ipnat -f /etc/ipf/ipnat.conf