SmartHotel360 manage with this app the coupons they provide to their guests.
Перейти к файлу
David Sanchez (MSFT) 1905855e5c
Update README.md
2020-02-04 15:24:32 -08:00
.mvn Add files via upload 2018-11-07 10:23:33 +08:00
images Init smart hotel coupons 2018-11-06 17:45:35 +08:00
src/main Update site.css 2018-11-07 09:48:16 +08:00
terraform Init smart hotel coupons 2018-11-06 17:45:35 +08:00
.gitignore Initial commit 2018-10-21 07:16:20 -07:00
Dockerfile Init smart hotel coupons 2018-11-06 17:45:35 +08:00
LICENSE Initial commit 2018-10-21 07:16:23 -07:00
README.md Update README.md 2020-02-04 15:24:32 -08:00
azuredeploy.json Update azuredeploy.json 2018-11-07 10:06:42 +08:00
deploy.cmd Init smart hotel coupons 2018-11-06 17:45:35 +08:00
mvnw Init smart hotel coupons 2018-11-06 17:45:35 +08:00
mvnw.cmd Init smart hotel coupons 2018-11-06 17:45:35 +08:00
pom.xml Init smart hotel coupons 2018-11-06 17:45:35 +08:00

README.md

This project is retired, archived, and no longer supported. You are welcome to continue to use and fork the repository.

For the latest sample references visit: https://aka.ms/tailwindtraders & https://aka.ms/rpsls

Smart hotel Coupon web application using Spring Boot and MySQL

Smart Hotel Coupon web application using Spring Boot with the following options:

  • Spring JPA and MySQL for data persistence
  • Thymeleaf template for the rendering.

To build and run the sample from a fresh clone of this repo:

Configure MySQL

  1. Create a database "hotel_coupon" in your MySQL instance. Please make sure that your MySQL version is 5.7.
  2. Update the application.properties file in the src/main/resources folder with the URL, username and password for your MySQL instance. The table schema for the hotel coupon objects will be created for you in the database.

Build and run the sample

  1. mvnw spring-boot:run
  2. Open a web browser to http://localhost:8080

As you search and review the guests coupons in the app you can verify the search result in the database through the MySQL console using simple statements like select * from guest.

Deploy Azure Components with ARM Template

GitHub Authorize

  1. Generate Token

    • Open https://github.com/settings/tokens in your web browser.

    • Sign into your GitHub account where you forked this repository.

    • Click Generate Token.

    • Enter a value in the Token description text box.

    • Select the following scopes (your selections should match the screenshot below):

      • repo (all) -> repo:status, repo_deployment, public_repo
      • admin:repo_hook -> read:repo_hook

    • Click Generate token.

    • Copy the token.

  2. Add the GitHub Token to Azure in the Azure Resource Explorer

Deploy Azure Components

  1. Fork this repository to your GitHub account.

  2. Click the Deploy to Azure Button:

    Deploy to Azure

  3. Fill in the values on the deployment page:

    BASICS:

    • Subscription: choose one of you subscriptions.
    • Resource group: it is recommend to create a new resource group.
    • Location: choose a location.

    SETTINGS:

    • Web App Name: the name of the web app. It should be unique. It is recommended to use a name like hotel-coupon-mgmt-<YourName>-<Date>, for example: hotel-coupon-mgmt-bob-180129

    • MySQL Admin Login Name: The admin login name of the MySQL server. Keep the default value or use the one you prefer.

      Note: Please do not use 'azure_superuser', 'admin', 'administrator', 'root', 'guest' or 'public'.

    • MySQL Admin Login Password: The admin login password of the MySQL server. Please use a strong password, for example P@ssw0rd2o18!.

    • Source Code Repository: use the URL of the repository you just created -https://github.com/<YourAccount>/Huddle

    • Source Code Branch: master

    • Source code Manual Integration: false

    TERMS AND CONDITIONS:

    • Check I agree to the terms and conditions stated above.
  4. Click Purchase.

  5. Visit the created hotel coupon web site at http://[Web App Name].azurewebsites.net/

  6. Login with username/password as me@smarthotel360.com/1234.