当前位置:网站首页>Establishment of Ruiji takeout development environment
Establishment of Ruiji takeout development environment
2022-07-28 22:19:00 【ajjjjjjjjjtty】
One 、 Database environment construction
Create a database through a graphical interface , take sql The statement is imported into the database

Two 、maven Environment building
Import various maven To configure stay pom.xml Import coordinates from file
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.itheima</groupId>
<artifactId>reggie_take_out</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.76</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.23</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.4.5</version>
</plugin>
</plugins>
</build>Write yml
server:
port: 8080
spring:
application:
name: reggie_take_out
datasource:
druid:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:13306/reggie?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: Zz.123456
mybatis-plus:
configuration:
# When mapping entities or attributes , Remove the underscores from the table names and field names in the database , Map according to the hump nomenclature
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
id-type: ASSIGN_IDCreate a project The project can be successfully started Then import the code of the front page into the project
Start class
@Slf4j
@SpringBootApplication
public class ReggieApplication {
public static void main(String[] args) {
SpringApplication.run(ReggieApplication.class);
log.info(" The project started successfully ...");
}
}Put front-end resources into resources, But there is an inaccessible problem , By default, only static、template Static resources under the static directory , At this time, we need to set the mapping of static resources by configuring classes
The configuration class sets the mapping of static resources
@Slf4j
// This is a configuration class So add configuration
@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport {
/**
* Rewriting methods :registry
* Method function : Configure the mapping of static resources
*/
@Override
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
// Resource processor Map the front page
log.info(" Start static resource mapping ...");
registry.addResourceHandler("/backend/**").addResourceLocations("classpath:/backend/");
registry.addResourceHandler("/front/**").addResourceLocations("classpath:/front/");
}
}Restart the project
边栏推荐
- HCIP(13)
- PCB材料简单介绍
- 局域网添加DNS服务器进行域名解析
- Oracle triggers
- 2021数学建模B组练习
- What is the difference between inline elements and block level elements? Semantic function
- [LiteratureReview]Object Detection and Mapping with Bounding Box Constraints
- KubeVela 1.4.x 官方文档
- Alibaba cloud CDN practice
- 什么是质因数,质因数(素因数或质因子)在数论里是指能整除给定正整数的质数
猜你喜欢
随机推荐
40. 组合总和 II
深度学习必备:对数据集的拆分、根据拆分图片拆分labels、对全部标注标签进行区间检查
【二叉树】二叉树中的伪回文路径
【机器学习】朴素贝叶斯对文本分类--对人名国别分类
40. Combined sum II
数据可视化新闻,不一样的新闻报道形式
Make trouble fishing day by day
Part 8: creating camera classes
【CVPR 2021】Cylinder3D:用于LiDAR点云分割的圆柱体非对称3D卷积网络
[machine learning] naive Bayesian classification of text -- Classification of people's names and countries
Written examination summary record
Data visualization news, different forms of news reports
The binary search boundary value processing based on leetcode35 is used to clarify the boundary value of the judgment condition using the idea of interval
学习 Kotlin - 扩展函数
Basic introduction of Rockwell AB PLC rslogix digital quantity IO module
The difference between get and post
Jmeter 安装第三方插件 Plugins Manager
Lvs+keepalived high availability deployment practical application
Ecmasript 5/6 notes
Tensorflow serving high performance machine learning model service system


![[LiteratureReview]Object Detection and Mapping with Bounding Box Constraints](/img/37/7cb5fa3a9078a5f5947485147c819d.png)





