# Spring MVC with Azure Cosmos DB - sample
Sample e-commerce application built with Spring Boot (MVC on servlet stack) and "Spring Data Cosmos" client library for Azure Cosmos DB SQL API.
![Image](BookStore.png)
## Features
- @Query annotation for finder method
- Collection configuration with annotations(Indexing, RUs).
- Multiple database and collections accessed from single application.
- Auto generating UUID based IDs.
- Spring Data Repository pattern.
- Enabling cosmos request diagnostics
- Directly using CosmosAsynClient from a spring application.
- Infinite scroll with JQuery.
- Filter by category.
## Getting started
### Pre-requisites
- `Java Development Kit 8`.
- An active Azure account. If you don't have one, you can sign up for a [free account](https://azure.microsoft.com/free/). Alternatively, you can use the [Azure Cosmos DB Emulator](https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator) for development and testing. As emulator https certificate is self signed, you need to import its certificate to java trusted cert store, [explained here](https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator-export-ssl-certificates).
- Maven.
- (Optional) SLF4J is a logging facade.
- (Optional) [SLF4J binding](http://www.slf4j.org/manual.html) is used to associate a specific logging framework with SLF4J.
- Clone the repo.
### Installation
1. Update the cosmos DB endpoint, key and locations information in application.properties
2. mvn spring-boot:run from the project base
3. On startup the application creates 2 databases and 4 collections between them.
4. Access the WebApp at http://localhost:81/ebooks/index
5. You will have to create user account to access the application functionality. The registration process asks for email ID, which will be used as the login ID. Any email address is fine as long as it has a valid format.
6. If you prefer docker:
- mvn package
- docker build -t <YOUR REPO>/ebookstorespringbootmvc .
- docker run -p 80:80 -e azure.cosmos.bookstore.uri=<COSMOS_ENDPOINT> -e azure.cosmos.bookstore.key=<COSMOS_KEY> -t <YOUR REPO>/ebookstorespringbootmvc
- Access the WebApp at http://localhost:81/ebooks/index
没有合适的资源?快使用搜索试试~ 我知道了~
Sample Spring MVC e-commerce application built with Spring Data
共178个文件
java:35个
jpg:35个
css:26个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 200 浏览量
2023-07-11
15:27:31
上传
评论
收藏 4.35MB ZIP 举报
温馨提示
Sample Spring MVC e-commerce application built with Spring Data
资源推荐
资源详情
资源评论
收起资源包目录
Sample Spring MVC e-commerce application built with Spring Data (178个子文件)
mvnw.cmd 6KB
bootstrap.css 193KB
ui.css 46KB
fontawesome-all.css 43KB
fontawesome.css 41KB
fontawesome-all.min.css 35KB
fontawesome.min.css 33KB
fancybox.min.css 13KB
owl.carousel.css 5KB
login.css 4KB
owl.carousel.min.css 3KB
slick-theme.css 3KB
prism.css 2KB
slick.css 2KB
owl.theme.default.css 1KB
owl.theme.green.css 1KB
responsive.css 1KB
owl.theme.green.min.css 1013B
owl.theme.default.min.css 1013B
material-icons.css 947B
fa-regular.css 705B
fa-solid.css 698B
fa-brands.css 686B
fa-regular.min.css 650B
fa-solid.min.css 642B
fa-brands.min.css 632B
font.css 491B
Dockerfile 114B
MaterialIcons-Regular.eot 140KB
fa-solid-900.eot 104KB
fa-brands-400.eot 96KB
fa-regular-400.eot 30KB
slick.eot 2KB
ajax-loader.gif 4KB
ajax-loader.gif 3KB
.gitignore 678B
index.html 46KB
checkout.html 11KB
index.html 10KB
cart.html 10KB
orders.html 7KB
orderconfirmation.html 5KB
createaccount.html 5KB
login.html 2KB
LoadBooks.java 9KB
StoreCosmosConfiguration.java 4KB
OrderController.java 4KB
Book.java 3KB
HomeController.java 3KB
BookRepositoryAsync.java 3KB
DefaultCartService.java 2KB
OrderHelper.java 2KB
CartController.java 2KB
OrderForm.java 2KB
SecuredCustomer.java 2KB
CustomerController.java 2KB
Order.java 2KB
Customer.java 2KB
CustomerDetailService.java 2KB
WebSecurityConfig.java 1KB
CartItem.java 1KB
CosmosProperties.java 1KB
LineItem.java 1KB
Cart.java 1KB
CreditCard.java 1KB
CustomerForm.java 1KB
Address.java 957B
Response.java 752B
Name.java 586B
OrderRepository.java 580B
Contact.java 495B
CartService.java 459B
EBookStoreApplication.java 435B
CustomerRepository.java 356B
CartRepository.java 350B
BookRepository.java 349B
SessionConfig.java 294B
CheckOutForm.java 182B
StoreApplicationTests.java 140B
softwareArchitect.jpg 65KB
Kubernetes.jpg 52KB
RustProgrammingLanguage.jpg 41KB
DockerNetworking.jpg 39KB
mongodb.jpg 33KB
blackHatGo.jpg 33KB
GuideToGraphDatabases.jpg 31KB
highPerformaceMysql.jpg 31KB
patternsOfEAA.jpg 30KB
node-design-patterns.jpg 30KB
CassandraDefinitiveguide.jpg 29KB
GraphAlgorithms.jpg 28KB
JavaConcurrency.jpg 28KB
nodeCookBook.jpg 28KB
SpringMicroServices.jpg 27KB
kaafkDefnitiveGuide.jpg 26KB
rabbitMQCookBook.jpg 26KB
AzureSQL.jpg 25KB
unitTesting.jpg 24KB
SevenDatabasesInSevenWeeks.jpg 24KB
ElasticSearchInAction.jpg 23KB
共 178 条
- 1
- 2
资源评论
GZM888888
- 粉丝: 186
- 资源: 2957
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功