运行环境:Java 8
-
找到
src/main/resources/application.yml
,修改你的数据库连接配置datasource: url: jdbc:mysql://localhost:3306/demo_db?useSSL=false&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_To_NULL&serverTimezone=Asia/Shanghai username: root #修改你的用户名和密码 password: password driver-class-name: com.mysql.cj.jdbc.Driver
-
在MySQl中新建名为
demo_db
的数据库,在该数据库中执行demo_db.sql
文件建表 -
在idea中构建并运行该Spring项目
-
访问
localhost:8888/index
\
- 使用了mockMVC,并且对controller层用到的Service进行mock
- IndexController
-
user
- UserController
- OrderController
- MessageController
- NewsController
- VenueController
-
admin
- AdminUserController
- AdminOrderController
- AdminMessageController
- AdminNewsController
- AdminVenueController