1

我正在将游戏框架中的 2.0 应用程序迁移到 2.2,该应用程序可以在以下位置找到:https ://github.com/biesior/Play-20-Sample-FullCalendar-Java

编译时只有一个神秘错误:

\Play-20-Sample-FullCalendar-Java-master\app\models\Event.java:14: **not found: type Model**
[error] public class Event extends Model {
[error]                            ^
[error] one error found
[error] (compile:compile) Compilation failed`enter code here`
[error] Total time: 3 s, completed Sep 28, 2013 12:32:00 AM
[FullCalendar] $

文件模型/Event.java:

package models;


import com.avaje.ebean;
import play.data.format.Formats;
import play.data.validation.Constraints;
import play.db.ebean;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
import java.util.List;

@Entity
public class Event extends Model {

    @Id
    public Long id;

plugins.sbt 文件:

// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"



// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")

构建.scala:

import sbt._
import Keys._
import play.Project._

object ApplicationBuild extends Build {

  val appName = "FullCalendar"
  val appVersion = "1.1.2-Snapshot"

  val appDependencies = Seq(
    javaEbean 
  )

  val main = play.Project(appName, appVersion, appDependencies).settings(
    // Add your own project settings here
  )

}

有什么见解吗?

谢谢,。

4

1 回答 1

0

注意你的进口。

你有import com.avaje.ebean;import play.db.ebean;进口。此类进口是非法的。您可以将它们更改为import com.avaje.ebean.*;import play.db.ebean.*;(或import play.db.ebean.Model;特别是)使其正常工作

于 2013-09-28T19:28:19.443 回答