Where to place hibernate.cfg.xml?

前端 未结 9 877
渐次进展
渐次进展 2020-12-02 22:40

My project is like this:

/src/main/java
     -thegamers
         -app.java
         -hibernateutil.java

can someone tell me where to put th

9条回答
  •  悲&欢浪女
    2020-12-02 22:58

    At the root of your project: /src (at leat as default)

    How to know if /src is the sources dir?
    When you create a new Java class, it is contained in a package (normally it is called as the same name of the dir where it is created). So, in your class declarion you can see something like this:

    package foo;
    
    class MyClass{
    

    In default IDE settings, the class should found under /src/foo/MyClass.java. As you can see, in this scenario /src acts as root sources dir.

提交回复
热议问题