我需要两个名为"States"和"Children"的Ebean模型类."State"对象可以包含嵌套的Child对象(子列表).
这是基本的国家阶级,
@Entity
public class States extends Model {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
@Constraints.Required(message = "stateName cannot be null")
@Column(nullable = false)
private String statename;
@Column(nullable = true)
private String url;
@Column(nullable = true)
private String parent;
private List<Children> childrenList;
}
Run Code Online (Sandbox Code Playgroud)
这是基本的儿童班,
@Entity
public class Children extends Model {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
@Column(nullable = false)
private String statename;
@Column
private String child;
}
Run Code Online (Sandbox Code Playgroud)
应该对这些类使用Ebean ORM创建State对象的最小修改是什么?我经历了这个帖子,
但在那里,已经提出了很多改变.我只想进行最小的修改.
我正在 gitlab runner 中构建一个 docker 镜像。所以,我使用 docker:latest 镜像,因为我需要将镜像推送到注册表,但在构建镜像之前,我需要打包我的 java 项目。如何使用docker镜像和maven来构建项目?
现在,gitlab runner 返回错误
$ docker run -it --rm -v "$(pwd)":/opt/maven -w /opt/maven maven:3.3.9-jdk-8 mvn clean install
the input device is not a TTY
ERROR: Job failed: exit code 1
Run Code Online (Sandbox Code Playgroud) 我正在使用java框架来开发Web应用程序.我想在运行时读取文件,该文件已包含在项目的文件夹中.但是在生产环境中,该文件夹不可用.有没有办法在运行时使文件夹可用?特别是,是否有一种默认方法来处理这种情况?
我经历了一个问题"如何在Play Framework 2.2.1中读取文件?1 "但是没有提到生产环境中的问题.