有代码:
object MarketTrigger extends DbHandler[MarketTrigger]{
implicit object BSONDateTimeHandler extends BSONHandler[BSONDateTime, DateTime] {
def read(time: BSONDateTime) = new DateTime(time.value)
def write(jdtime: DateTime) = BSONDateTime(jdtime.getMillis)
}
implicit val mtFormat = Macros.handler[MarketTrigger]
override implicit val format = Macros.handler[MarketTrigger]
...
我有Implicit org.joda.time.DateTime for 'value till' not found
第二个隐式 val 的错误,而第一个没问题。对我来说有点奇怪的行为。这是怎么回事?