Play Framework 2.6 (Java) development environment creation

Note that the import part did not work at all when creating a Model in "Play Framework 2 Thorough Introduction"

environment
Create a project (directory is optional)
c:¥hoge>activator new [The name of the created project] play-java
Move directory
c:¥hoge>cd [Created project]
Added to plugins.sbt

plugins.sbt


addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.10")
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.8")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0")
addSbtPlugin("org.irundaia.sbt" % "sbt-sassify" % "1.4.6")
#add to
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")
#addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.0.2")
Convert for eclipse
c:¥hoge¥hoge>activator eclipse
Application launch
c:¥hoge¥hoge>activator run

It was all right so far, but I got hooked when creating the model.

Java file in question

Message.java


package models;

import java.util.Date;
import javax.persistence.*;
import com.avaje.ebean.Model;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
public class Message extends Model {
    @Id
    public Long id;
    public String name;
    public String mail;
    public String message;
    public Date pastDate;
}

Added to plugins.sbt

plugins.sbt


addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.10")
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.8")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0")
addSbtPlugin("org.irundaia.sbt" % "sbt-sassify" % "1.4.6")
#add to
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")
#Uncomment
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.0.2")
Added to build.sbt

build.sbt


lazy val root = (project in file(".")).enablePlugins(PlayJava)
                .enablePlugins(PlayEbean) //Postscript
scalaVersion := "2.11.7"

libraryDependencies ++= Seq(
  javaJdbc,
  cache,
  javaWs,
  javaJpa, //Postscript
  "org.postgresql" % "postgresql" % "9.4.1212.jre7", //Postscript
  "org.projectlombok" % "lombok" % "1.16.10" //Postscript
)
activator update
c:¥hoge¥hoge>activator update
Reflected in eclipse
c:¥hoge¥hoge>activator "eclipse with-source=true"
compile
c:¥hoge¥hoge>activator compile

Solved for the time being.

Recommended Posts

Play Framework 2.6 (Java) development environment creation
Java development environment
Play Framework 2.6 (Java) environment construction in Eclipse
Play Framework2.5 (Java) Tips
java development environment construction
[Development] Java framework comparison
Java Development Basics ~ Development Environment Settings and Project Creation ~
Java development environment (Mac, Eclipse)
[Eclipse Java] Development environment setting memo
Prepare Java development environment with Atom
java framework
About the current development environment (Java 8)
Build Java development environment (for Mac)
Java development environment (Mac, VS Code)
Install Java development environment on Mac
Prepare Java development environment with VS Code
[Processing x Java] Construction of development environment
Java development environment construction memo on Mac
Let's create a Java development environment (updating)
What is Java and Development Environment (MAC)
Build a Java development environment on Mac
Build Java 8 development environment on AWS Cloud9
Spring Boot + Docker Java development environment construction
Post to Slack from Play Framework 2.8 (Java)
[Personal memo] Java development environment is ready
Java application development environment created in VM environment
Java development training
[Java development] Java memory
[Java] Environment construction
Java environment construction
Play Framework study
Java framework comparison
java file creation
java directory creation
[Java] Collection framework
[Java] Build Java development environment on Ubuntu & check execution
Build a development environment for Docker, java, vscode
Points stuck in building VSCode & Java development environment
[Beginner] Install java development tool in cloud9 development environment.
Build a Java development environment with VS Code
Build Java development environment with VS Code on Mac
Eclipse ~ Java project creation ~
Java development environment construction on Mac-JDK Install (2020 preservation version)
[Summary] Java environment preparation
[Mac] VS Code development environment construction (Java, Gradle, Node.js)
Play Framework studying test
Java development link summary
Build Java development environment with WSL2 Docker VS Code
How to build Java development environment with VS Code
Create a Java, JavaScript team development environment (problem raising)
play framework personal notes
[Environment construction] Build a Java development environment with VS Code!
Try to build a Java development environment using Docker
Build Java program development environment with Visual Studio Code
Java Discord Bot creation
Java + Spring development environment construction with VirtualBox + Ubuntu (Xfce4)
[Java] Calculator program creation 1
Docker × Java Building a development environment that is too simple
I tried to create a java8 development environment with Chocolatey
Web application development environment construction in Java (for inexperienced people)
[Java] [Play Framework] Until the project is started with Gradle