Giter VIP home page Giter VIP logo

guestbook's Introduction

Guest Book

Guest book application provides users to create guest book entries and administration will approve or reject the entries.

Built With

  • Maven - Dependency Management
  • Java 1.8 - Java™ Platform, Standard Edition Development Kit
  • Spring Boot - Framework to ease the bootstrapping and development of new Spring Applications
  • H2 In Memory - In memory database
  • git - Free and Open-Source distributed version control system
  • Bootstrap - User interface
  • Log4J - Logging API

Running the application locally

To run the application follow the below steps.

  • clone the Git repository.
  • Unzip the zip file (if you downloaded one)
  • Open Command Prompt and Change directory (cd) to folder containing pom.xml
  • Open Eclipse
    • File -> Import -> Existing Maven Project -> Navigate to the folder where you unzipped the zip
    • Select the project
  • Choose the Spring Boot Application file (search for @SpringBootApplication)
  • Right Click on the project and Run as Spring boot App
  • After starting the server. open browser and hit the link http://localhost:9090/h2 to connect to the In memmory database
  • Click on connect button and execute the below script to set up the initial tables for the user login(Admin/User).

insert into Guest_User (USER_ID, USER_NAME, ENCRYTED_PASSWORD, ENABLED) values (1, 'admin', '$2a$10$PrI5Gk9L.tSZiW9FXhTS8O8Mz9E97k2FZbFvGFFaSsiTUIl.TCrFu', 1);

insert into Guest_User (USER_ID, USER_NAME, ENCRYTED_PASSWORD, ENABLED) values (2, 'user1', '$2a$10$PrI5Gk9L.tSZiW9FXhTS8O8Mz9E97k2FZbFvGFFaSsiTUIl.TCrFu', 1);

insert into Guest_User (USER_ID, USER_NAME, ENCRYTED_PASSWORD, ENABLED) values (3, 'user2', '$2a$10$PrI5Gk9L.tSZiW9FXhTS8O8Mz9E97k2FZbFvGFFaSsiTUIl.TCrFu', 1);

insert into Guest_role (ROLE_ID, ROLE_NAME) values (1,'ROLE_ADMIN');

insert into Guest_role (ROLE_ID, ROLE_NAME) values (2,'ROLE_USER');

insert into user_role (ID,USER_ID, ROLE_ID) values (1,1, 1);

insert into user_role (ID,USER_ID, ROLE_ID) values (2,2, 2);

insert into user_role (ID,USER_ID, ROLE_ID) values (3,3, 2);

  • open new browser tab and hit the url http://localhost:9090. login with below users. -- Admin : admin/123 -- User : user1/123

Alternatively you can use the jar file to run the application and follow above to steps to run the application.

java -jar guestbooktest-0.0.1-SNAPSHOT.jar

## packages

- `models` — to hold our entities;
- `repositories` — to communicate with the database;
- `services` — to hold our business logic;
- `controllers` — to listen to the client;

- `resources/` - Contains all the static resources, templates and property files.
- `resources/css` - contains static resources such as css, js and images.
- `resources/templates` - contains server-side templates which are rendered by Spring.
- `resources/application.properties` - It contains application-wide properties. Spring reads the properties defined in this file to configure your application. You can define server’s default port, server’s context path, database URLs etc, in this file.

- `test/` - contains unit and integration tests

- `pom.xml` - contains all the project dependencies

guestbook's People

Contributors

krishnar0 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.