首页 \ 问答 \ JPA实体和Hibernate实体的区别(Difference between JPA Entity and Hibernate Entity)

JPA实体和Hibernate实体的区别(Difference between JPA Entity and Hibernate Entity)

当我用@Entity注解一个类并尝试解决依赖关系时,我可以选择两个不同包之间的包,javax.persistence.Entity和org.hibernate.annotations.Entity

javax包是JPA的实体注释,但为什么有一个hibernate实体注释,它与JPA的注解有什么不同? 它只是一个允许定义更多属性的扩展吗?


When I annotate a class with @Entity and try to resolve the dependencies, I get to choose the package between two different packages, javax.persistence.Entity and org.hibernate.annotations.Entity

The javax package is JPA's entity-annotation, but why is there a hibernate entity-annotation and difference does it have with JPA's annotation? Is it just an extension to allow more attributes to be defined?


原文:https://stackoverflow.com/questions/955515
更新时间:2021-11-18 16:11

最满意答案

Linux下perl文件的执行#!  /usr/bin/perl  
 第一个“#”表示是这一行是注释  
 第二个“!”表示这一行不是普通注释,而是解释器路径的声明行  
 后面的“/usr/bin/perl”是perl解释器的安装路径,也有可能是:“/usr/local/bin/perl”,如果那个不行,就换这个。  
这样修改后,文件就是这个模样:  
 #!/usr/bin/perl   
 #test.pl  
 print  "test  message!  \n";  
然后,给文件加上可执行的属性:   
 $  chmod  755  test.pl    或者    $  chmod  +x  test.pl  
这两个命令用哪一个都可以。     

  现在执行吧:  $  ./test.pl

其他回答

1、先在命令行下输入path,检查c:\strawberry\perl\bin是否在其中。
2、如果是就ok了,要运行perl程序test.pl只需输入perl test.pl即可。
3、如果路径中有空格,要用引号引起来。

相关问答

更多
  • 首先要保证你安装的是正确的,接着保证你的这个可执行文件有当前登录账号的执行权限,可以用ls -al查看一下。如果,你可以使用如下方式执行:1、./tlesp (如果后面又参数,你可以根据需要添加参数)。2、/home/path/tlsap (如果后面又参数,你可以根据需要添加参数)找到学习linux的好方法,请关注《linux就该这么学》官网。
  • Linux下perl文件的执行#! /usr/bin/perl 第一个“#”表示是这一行是注释 第二个“!”表示这一行不是普通注释,而是解释器路径的声明行 后面的“/usr/bin/perl”是perl解释器的安装路径,也有可能是:“/usr/local/bin/perl”,如果那个不行,就换这个。 这样修改后,文件就是这个模样: #!/usr/bin/perl #test.pl print "test message! \n"; 然后,给文件加上可执行的属性: $ chmod 755 test.pl 或者 ...
  • 如果你从STDIN中读取(使用<>构造),最简单的就是 perl conllevall.pl dataset.txt > output.txt 通过将.pl扩展与perl关联也是如此 conllevall.pl dataset.txt > output.txt 应该管用。 If you read from STDIN (using <> construct), the simplest would be perl conllevall.pl dataset.txt > output.txt by as ...
  • 文件上传只是另一个POST请求! 请参阅CGI.pm中的DEBUGGING 。 程序是index.pl ,要上传的文件是somefile.bin ,表单字段名是uploaded_file : REQUEST_METHOD=POST \ CONTENT_TYPE='multipart/form-data; boundary=xYzZY' \ perl index.pl < <( perl -MHTTP::Request::Common=POST -e' print POST( ...
  • 我认为问题是你指定你的网址的方式,它需要在开始时有http://部分。 当我输入时它对我有用 python sys.py http://www.google.com/ 但失败了 python sys.py www.google.com (注意我使用linux和python 2.7,但我认为它可能是同样的问题) I think the problem is the way you specify your url, it needs to have the http:// part at the star ...
  • 它很可能是一个环境问题。 使用默认系统环境(默认路径,LANG等)启动“.cron”脚本时,不会执行.profile,.rc。 因此,您需要在脚本中提供程序所需的所有环境变量PATH等。 这对于纯perl脚本来说有点痛苦,所以最好将它包装在一个shell脚本中,该脚本设置你的“.profile”脚本设置的内容。 Solved: You won't believe how problem got resolved, I use perl instead of /usr/bin/perl in crontab, ...
  • 在Win32上使用的最简单的perl是ActiveState的ActivePerl 。 Strawberry Perl提供了更“普通”的Perl体验(它包含一个C编译器并使之可以执行常规的CPAN风格安装)。 最后, Cygwin是适用于Windows的Unix环境。 Perl是Cygwin可用的许多工具之一。 Indigo Perl也是一款同类产品,但它们确实有一个用于测试Web应用程序的好套件。 他们发布了一个很容易入门的Apache,mod_perl,perl组合。 win32.perl.org是一个 ...
  • 从这本书(第44页,第4版): 最后,如果脚本位于与您工作的目录不同的目录中,请记住提供脚本的完整路径。 对于您的情况,这意味着使用 C:\User\Example> python C:\User\Example\my_scripts\script1.py 您可以编写一个批处理文件,在预定义的目录中查找该脚本: @echo off setlocal PATH=C:\User\Example\Python36;%PATH% SCRIPT_DIR=C:\User\Example\my_scripts pyth ...
  • 阿尔,我很难过这么长时间才意识到这么简单的问题。 问题是字符串格式化 - 文件usernames.txt是由某人使用Windows创建并具有dos格式(CRLF)。 我猜这个参数是以[用户名] [LF]的形式到达并搞砸了$ User变量的实例化。 我敢肯定,如果没有来这里讨论它,我就永远不会得到这个,我只是绕着圈子试着自己动手。 该决议只是为了: sudo apt-get install tofrodos sudo fromdos usernames.txt 然后原始脚本工作 非常感谢帮助人员。 编辑:现 ...
  • 谁在乎? 确切的规则令人费解,难以记住 。 只需在Perl one liners中使用双引号即可避免此问题。 你知道你有' , q{}和qq{}可用。 所有cmd的转换都是由其中一个元字符( , ) , % ,!触发的! , ^ , " , < , > , &和| 。 "特别有趣:当cmd正在转换命令行并看到一个" ,它复制一个"到新的命令行,然后开始复制旧命令行中的字符到新的角色而不看这些角色是否是元字符。 这种复制一直持续到cmd到达命令行的末尾,进入变量替换,或者看到另一个" 。在最后一种情况下,cm ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。