grailsアプリケーションにatmosphereプラグインを実装しようとしています。私は次のコードを持っています
class AtmosphereService {
static transactional = true
static atmosphere = [mapping: '/atmosphere/status']
static exposes = ['jms']
@Subscriber(topic='msgevent')
def onEvent(msg) {
def payload = msg
if(msg instanceof Map) {
// convert map messages to JSON
payload = msg.encodeAsJSON()
}
// broadcast to the atmosphere
broadcaster['/atmosphere/status'].broadcast(payload)
println("jms service-> "+payload)
/*Broadcaster brod = lookupBroadcaster(msg["id"], false)
brod.broadcast(payload)*/
return null
}
onRequestクロージャとonStateChangeクロージャも追加しました。しかし、「ネストされた例外はgroovy.lang.MissingPropertyExceptionです:そのようなプロパティはありません:クラスのブロードキャスター:com.AtmosphereService」例外が発生します。何を間違えたのか理解できません。誰かがこれを手伝ってくれませんか。ありがとう