StringBoot+Mybatis的增删改查(五)

整体项目链接地址:

StringBoot+Mybatis的增删改查(一)
StringBoot+Mybatis的增删改查(二)
StringBoot+Mybatis的增删改查(三)
StringBoot+Mybatis的增删改查(四)
StringBoot+Mybatis的增删改查(五)

七、配置

1、css美化(beautify.css)

@charset "UTF-8";
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "微软雅黑";
}

body {
    font-family: Arial;
    color: #4f6b72;
    background: #E6EAE9;
}
/* 头部标题 */
.header {
    background-size:100% 185px;
    background-repeat:no-repeat;
    padding: 53px;
    text-align: center;

}

.header h1 {
    font-size: 50px;
}
a {
    color: #c75f3e;
    text-decoration: none; /* 去除默认的下划线 */
}

#table {
    width: 700px;
    padding: 0;
    margin: 100px auto 0 auto;
}

td {
    text-align: center;
    background: #fff;
    font-size:11px;
    padding: 6px 6px 6px 12px;
}

input
{

    color: #000;
    letter-spacing: 1px;
    margin-bottom:30px;/*输入框设置*/
    border:none;
    border-bottom:1px solid #000;
    outline:none;
    background:transparent;
}
input[type="submit"]
{
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    background:#03a9f4;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
}

2、数据库配置(application.properties)

#app name
spring.application.name=com.xxx
#web port
server.port=8080
#datasource configure
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.name=defaultDataSource
spring.datasource.url=jdbc:mysql://localhost:3306/xxx?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC
spring.datasource.username=xxxxx
spring.datasource.password=xxxxx
mybatis.mapper-locations=classpath:mybatis/*.xml 

3、依赖配置(pom.xml)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.0</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com</groupId>
    <artifactId>xxx</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>xxx</name>
    <description>xxx</description>
    <properties>
        <java.version>1.8</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.2.2</version>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.5.10</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
            <version>2.7.0</version>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.0.27</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

4、数据库
part表
在这里插入图片描述
detail表
在这里插入图片描述
后续在我Java专栏里。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

傻猴儿

小编,多谢客官留下的赏钱。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值