小编zjo*_*jor的帖子

静态元模型不包含 @Embeddable 类的属性

我有一个像这样的嵌入式模型类:

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class EmbeddableEntity {

    @Column(name = "property")
    private String property;

}
Run Code Online (Sandbox Code Playgroud)

但生成的静态元模型不包含属性:

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package cz.zjor.model;

import cz.zjor.model.EmbeddableEntity;
import javax.persistence.metamodel.StaticMetamodel;

@StaticMetamodel(EmbeddableEntity.class)
public abstract class EmbeddableEntity_ {
    public EmbeddableEntity_() {
    }
}
Run Code Online (Sandbox Code Playgroud)

我通过 Maven 启用了生成,如下所示:

<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.5</version>
<executions>
    <execution>
        <id>process</id>
        <goals>
            <goal>process</goal>
        </goals>
        <phase>generate-sources</phase>
        <configuration>
            <processors>
                <processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
            </processors>
        </configuration>
    </execution>
</executions>
<dependencies>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-jpamodelgen</artifactId>
        <version>${hibernate.version}</version>
    </dependency> …
Run Code Online (Sandbox Code Playgroud)

java hibernate embeddable maven

5
推荐指数
0
解决办法
781
查看次数

无法提取Docker映像,出现“远程错误:访问被拒绝”

我正在尝试检查安装 docker pull hello-world

但是出现以下错误:

Pulling repository hello-world
Get https://index.docker.io/v1/repositories/library/hello-world/images: remote error: access denied
Run Code Online (Sandbox Code Playgroud)

我有CentOS 6.5

Docker版本1.7.1,内部版本786b29d / 1.7.1

我在公司网络中,但是curl https://index.docker.io/v1/repositories/library/hello-world/images可以。

可能是什么问题?

提前致谢!

docker centos6.5

5
推荐指数
2
解决办法
2万
查看次数

如果登录被拒绝,如何代表用户执行命令

我需要代表tomcat用户运行tomcat .但是/etc/passwd我有以下几行:

tomcat:x:505:506::/usr/share/tomcat:/bin/nologin
Run Code Online (Sandbox Code Playgroud)

所以当我尝试这样做时: sudo su tomcat ./bin/startup.sh

它抱怨: su: /bin/nologin: No such file or directory

如何使用适当的权限执行命令?

提前致谢!

PS我正在尝试对配置进行逆向工程并进行生产.所以我必须要精致......

linux shell tomcat login

3
推荐指数
1
解决办法
7787
查看次数

标签 统计

centos6.5 ×1

docker ×1

embeddable ×1

hibernate ×1

java ×1

linux ×1

login ×1

maven ×1

shell ×1

tomcat ×1