Problem with JPA annotation

I try to develop a web application with Scala and Spring Boot.
When I define an entity class like this

class Term{
    var id:Int=_

    var startDate:Long=_
    var endDate:Long=_

always report error : illegal start of simple expression at @Index.
I use STS, but the error reported too when compiled with mvn.

I can not find any answer, it’s really depressing.

You must use new Index, like this:

import scala.beans.BeanProperty
@Entity @Table(name = "t_term", indexes = Array(new Index(columnList = "startDate"))) class Term
   { @Id    @BeanProperty    var id
   : Int = _ @BeanProperty    var startDate
   : Long = _ @BeanProperty    var endDate: Long = _ }

BTW: Skip the @BeanProperty annotations, not necessary (unless you have to interacti with Java-frameworks which require this…)

@andreak Thank you very much! It work now.