0

The Grails request object is an instance of HttpServletRequest. Is there any way to get a unique id from the request object? My end goal is to store session data specific to a request, so I need a String or number that I can use as a unique identifier.

4

2 に答える 2

2

たぶん、リクエスト属性として一意のIDを追加しますか?

request.setAttribute('UID', Math.random())
于 2013-03-07T15:53:49.757 に答える
1

フィルタ内で静的ThreadLocalを使用してみませんか?

于 2013-03-06T23:01:14.090 に答える