秒杀项目

开发环境搭建

1. 创建普通的Maven模块15-seckill-interface

该模块下主要放model,接口及一些工具类

2. 创建SpringBoot模块15-seckill-service,集成Web依赖

该模块主要进行业务的实现

• 指定项目上下文根为/15-seckill-server,端口号为9090

server.servlet.context-path=/15-seckill-service
server.port=9090

3. 创建SpringBoot模块15-seckill-web,集成Web和Thymeleaf依赖

该模块主要做前端的展示及处理前端请求

• 指定项目上下文根为/15-seckill-web,端口号为8080

server.servlet.context-path=/15-seckill-web
server.port=8080
# 开发阶段缓存建议关闭
spring.thymeleaf.cache=false

• 在pom.xml文件中添加热部署插件

<!--热部署插件-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

 

技术文档推荐

更多>>

视频教程推荐

更多>>