4.1 KiB
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
- Create a database "hotel_coupon" in your MySQL instance. Please make sure that your MySQL version is 5.7.
- 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
mvnw spring-boot:run
- 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
-
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.
-
-
Add the GitHub Token to Azure in the Azure Resource Explorer
-
Open https://resources.azure.com/providers/Microsoft.Web/sourcecontrols/GitHub in your web browser.
-
Log in with your Azure account.
-
Selected the correct Azure subscription.
-
Select Read/Write mode.
-
Click Edit.
-
Paste the token into the token parameter.
-
Click PUT.
-
Deploy Azure Components
-
Fork this repository to your GitHub account.
-
Click the Deploy to Azure Button:
-
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.
-
Click Purchase.
-
Visit the created hotel coupon web site at http://[Web App Name].azurewebsites.net/
-
Login with username/password as me@smarthotel360.com/1234.