Skip to content

A small beverage distributor simulator from database.

Notifications You must be signed in to change notification settings

EliottTardieu/Drinked

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drinked, THE way to drink.

Run the .jar file after compiling

To run the application after compiling the source code, you will find in the target/out the jar file.
You have to have your source code compiled with your mysql settings set up as said in the "Database Setup" section for the jar to work.
You should then open a terminal, and do a java -jar [filename].jar
You should now see the application as it would be if compiled from your IDE.
If you have any issues please contact eliott.tardieu@etu.univ-tours.fr or guillaume.cazin@etu.univ-tours.fr

Run the source code in IntelliJ

To run the source code, you want to add a configuration.
In this configuration, you will run the command "exec:java" via maven. You should also add a maven goal to "run before launch" with argument "install" so it will compile your source code before running it.
This whole project is using maven. If you need to edit maven configuration, please modify the pom.xml profect file attached.

Database Setup

Here we have the procedure to follow in order to install the database. All commands are meant to be run in bash.

  1. You must log in your mysql server using "mysql -u username -p".
  2. You will then create the database: "CREATE DATABASE drinked;".
  3. Then you log off from mysql and you go into the directory containing "drinked.sql".
  4. Once you are in the right directory, you will execute this command: "mysql -u root -p drinked < drinked.sql".
You have now imported successfully the drinked database, with already existing examples in it.

If you want to reset data to the original examples, you can remove all your data and import drinked_data.sql in your database.

Now to get your drinkedDB to work:
  1. You will find in src/main/resources/fr/drinked/config/ the config.properties.example file.
  2. You will copy paste it in the same directory and rename it to "config.properties".
  3. You will then enter your database (mysql) username and password.
  4. As it is in a conf.properties file which was gitignored, it will never be on git, so you can safely enter your credentials, this is a simple trick to secure the application.

About

A small beverage distributor simulator from database.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages