zoukankan      html  css  js  c++  java
  • No identifier specified for entity

    今天练习springboot项目搭建,建完实体类也加了jpa注解,但是启动一直报错。


    No identifier specified for entity:。
    百度解决方案全是@Id和@GeneratedValue注解不要加在setId()方法上,要加在get方法上,试了还是未解决。

    终于看到这篇文章,http://blog.csdn.net/qq_33240946/article/details/52916532。

    原来是@Id注解import错包了。

    错误:

    import org.springframework.data.annotation.Id;
    正确:

    import javax.persistence.*;

    ---------------------
    作者:2YSP
    来源:CSDN
    原文:https://blog.csdn.net/stupid_java_learner/article/details/78346820
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    git知识点总结
    自动化进阶
    unittest单元测试框架
    自动化测试模型
    webdriver
    python文件处理
    uva 11077 置换
    poj 1066 Treasure Hunt
    poj 2661 Factstone Benchmark
    hdu 4180
  • 原文地址:https://www.cnblogs.com/yuanqt/p/10734150.html
Copyright © 2011-2022 走看看