GithubHelp home page GithubHelp logo

ishreya09 / book-on-rails Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.84 MB

A full stack train ticket management system made using Java Spring Boot and ThymeLeaf. The database implementation is done through MySQL for Train and ticket management from scratch.

License: MIT License

Java 51.57% CSS 0.97% HTML 46.25% JavaScript 1.21%
java system-design design-patterns mvc-architecture mysql solid-principles spring-boot spring-mvc-framework thymeleaf

book-on-rails's Introduction

Book On Rails

To configure the project

Go to your MYSQL Server/Workbench and Open as Root user and run the following commands

create database bookonrails; -- Creates the new database
create user 'springuser'@'%' identified by 'ThePassword'; -- Creates the user
grant all on bookonrails.* to 'springuser'@'%'; -- Gives all privileges to the new user

Create a new file as application.properties in src/main/resources and add the following code

spring.application.name=ooad

server.port = 4000

spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/BookOnRails
spring.datasource.username=springuser
spring.datasource.password=ThePassword
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html

To run the project

cd ooad
./mvnw spring-boot:run

To run the project in the browser

http://localhost:4000

Procedure to trigger finding of routes containing src and dest

DELIMITER //

CREATE PROCEDURE FindRouteBetweenStations(
    IN source_station_code VARCHAR(255),
    IN destination_station_code VARCHAR(255)
)
BEGIN
    SELECT r.route_code
    FROM route r
    JOIN station_timings st1 ON r.id = st1.route_id
    JOIN station_timings st2 ON r.id = st2.route_id
    WHERE st1.station_code = source_station_code
    AND st2.station_code = destination_station_code;
END //

DELIMITER ;

CALL FindRouteBetweenStations("HTE","MURI");

book-on-rails's People

Contributors

ishreya09 avatar sinchana13 avatar mystery510 avatar aditigoyal291 avatar sirimm22 avatar adrija-banerjee avatar akankshamulgund avatar nistha-singh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.