Skip to content

Svydovets-Bobocode-Java-Ultimate-3-0/Bibernate-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Requirements

  • Java: Version 17
  • Maven: Make sure Maven is installed on your system. You can download it from here.
  • Postgres DB
  • Bibernate ORM
  • Flyway

Getting Started with DEMO app

To start working on our project in the demo app, follow these steps:

  1. Clone the Repository Bibernate app:

    git clone https://github.com/Svydovets-Bobocode-Java-Ultimate-3-0/Bibernate.git
    cd Bibernate
  2. Build the Project:

     mvn clean install
  3. Init DB configuration

By default use:

database : Postgres DB / database name : postgres / schema name : svydovets-demo

src/java/resources/db/migration/application.properties
db.url=jdbc:postgresql://localhost:5432/postgres?currentSchema=[SCHEMA]
db.user=[USER]
db.password=[PASSWORD]
  1. Init DB configuration in pom file from flyway migratioms
<build>
    <plugins>
        <plugin>
            ...
            <configuration>
                <driver>org.postgresql.Driver</driver>
                <url>jdbc:postgresql://localhost:5432/</url>
                <user>[USER]</user>
                <password>[PASSWORD]</password>
                <schemas>[SCHEMA]</schemas>
            </configuration>
            ...
        </plugin>
    </plugins>
</build>
  1. Migrate data:
cd Bibernate
mvn flyway:migrate
  1. Run the application:
  public class DemoApp {

    public static void main(String[] args) {
        SessionFactory sessionFactory = new SessionFactory();
        Session session = sessionFactory.createSession();
        
        ...
    
        session.close();
    }
}
    1. Build the Demo Project:
 mvn clean install
  1. Enjoy :)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages