diff --git a/model/pom.xml b/model/pom.xml index b01a3cb..eb9a445 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -26,5 +26,49 @@ + + + + + com.baomidou + mybatis-plus-boot-starter + 3.4.0 + + + + com.baomidou + mybatis-plus + 3.4.0 + + + + + mysql + mysql-connector-java + 5.1.38 + + + org.springframework.boot + spring-boot-starter-web + ${springboot.version} + + + org.mybatis.generator + mybatis-generator-core + 1.3.2 + + + junit + junit + 4.12 + test + + + org.springframework.boot + spring-boot-starter-test + 2.3.4.RELEASE + test + + \ No newline at end of file diff --git a/model/src/main/java/cn/org/gitlink/notification/model/ModelApplication.java b/model/src/main/java/cn/org/gitlink/notification/model/ModelApplication.java new file mode 100644 index 0000000..3572b13 --- /dev/null +++ b/model/src/main/java/cn/org/gitlink/notification/model/ModelApplication.java @@ -0,0 +1,12 @@ +package cn.org.gitlink.notification.model; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class ModelApplication { + public static void main(String[] args) { + SpringApplication.run(ModelApplication.class, args); + } + +} diff --git a/model/src/main/java/cn/org/gitlink/notification/model/config/MyBatisPlusConfig.java b/model/src/main/java/cn/org/gitlink/notification/model/config/MyBatisPlusConfig.java new file mode 100644 index 0000000..13d747c --- /dev/null +++ b/model/src/main/java/cn/org/gitlink/notification/model/config/MyBatisPlusConfig.java @@ -0,0 +1,35 @@ +package cn.org.gitlink.notification.model.config; + +import cn.org.gitlink.notification.model.handler.MetaHandler; +import com.baomidou.mybatisplus.core.config.GlobalConfig; +import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +@EnableTransactionManagement +@Configuration +@MapperScan("cn.org.gitlink.notification.model.dao") +public class MyBatisPlusConfig { + + /** + * 分页插件 + */ + @Bean + public PaginationInterceptor paginationInterceptor() { + PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); + return paginationInterceptor; + } + + /** + * 自动填充功能 + * @return + */ + @Bean + public GlobalConfig globalConfig() { + GlobalConfig globalConfig = new GlobalConfig(); + globalConfig.setMetaObjectHandler(new MetaHandler()); + return globalConfig; + } +} diff --git a/model/src/main/java/cn/org/gitlink/notification/model/dao/entity/PlatformInfo.java b/model/src/main/java/cn/org/gitlink/notification/model/dao/entity/PlatformInfo.java new file mode 100644 index 0000000..78af73e --- /dev/null +++ b/model/src/main/java/cn/org/gitlink/notification/model/dao/entity/PlatformInfo.java @@ -0,0 +1,69 @@ +package cn.org.gitlink.notification.model.dao.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.util.Date; + +public class PlatformInfo { + @TableId(type = IdType.AUTO) + private Integer id; + + private String platformCode; + + private String platformName; + + private Date createdAt; + + private Date updatedAt; + + private Boolean isDelete; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getPlatformCode() { + return platformCode; + } + + public void setPlatformCode(String platformCode) { + this.platformCode = platformCode == null ? null : platformCode.trim(); + } + + public String getPlatformName() { + return platformName; + } + + public void setPlatformName(String platformName) { + this.platformName = platformName == null ? null : platformName.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Boolean getIsDelete() { + return isDelete; + } + + public void setIsDelete(Boolean isDelete) { + this.isDelete = isDelete; + } +} \ No newline at end of file diff --git a/model/src/main/java/cn/org/gitlink/notification/model/dao/entity/SysNotification.java b/model/src/main/java/cn/org/gitlink/notification/model/dao/entity/SysNotification.java new file mode 100644 index 0000000..8165532 --- /dev/null +++ b/model/src/main/java/cn/org/gitlink/notification/model/dao/entity/SysNotification.java @@ -0,0 +1,89 @@ +package cn.org.gitlink.notification.model.dao.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; + +import java.util.Date; + +public class SysNotification { + @TableId(type = IdType.AUTO) + private Integer id; + + private Long sender; + + private Long receiver; + + private String content; + + private String notificationUrl; + + private Date createdAt; + + private Byte status; + + private Boolean isDelete; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Long getSender() { + return sender; + } + + public void setSender(Long sender) { + this.sender = sender; + } + + public Long getReceiver() { + return receiver; + } + + public void setReceiver(Long receiver) { + this.receiver = receiver; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content == null ? null : content.trim(); + } + + public String getNotificationUrl() { + return notificationUrl; + } + + public void setNotificationUrl(String notificationUrl) { + this.notificationUrl = notificationUrl == null ? null : notificationUrl.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Byte getStatus() { + return status; + } + + public void setStatus(Byte status) { + this.status = status; + } + + public Boolean getIsDelete() { + return isDelete; + } + + public void setIsDelete(Boolean isDelete) { + this.isDelete = isDelete; + } +} diff --git a/model/src/main/java/cn/org/gitlink/notification/model/dao/mapper/OperateTableMapper.java b/model/src/main/java/cn/org/gitlink/notification/model/dao/mapper/OperateTableMapper.java new file mode 100644 index 0000000..abf2f18 --- /dev/null +++ b/model/src/main/java/cn/org/gitlink/notification/model/dao/mapper/OperateTableMapper.java @@ -0,0 +1,10 @@ +package cn.org.gitlink.notification.model.dao.mapper; + +import org.apache.ibatis.annotations.Param; + +public interface OperateTableMapper { + int existTable(@Param("tableName")String tableName); + int dropTable(@Param("tableName")String tableName); + int createNewTable(@Param("tableName")String tableName); +// int insert(@Param("tableName")String tableName,@Param("trackpoint")Trackpoint trackpoint); +} diff --git a/model/src/main/java/cn/org/gitlink/notification/model/dao/mapper/PlatformInfoMapper.java b/model/src/main/java/cn/org/gitlink/notification/model/dao/mapper/PlatformInfoMapper.java new file mode 100644 index 0000000..fac337a --- /dev/null +++ b/model/src/main/java/cn/org/gitlink/notification/model/dao/mapper/PlatformInfoMapper.java @@ -0,0 +1,18 @@ +package cn.org.gitlink.notification.model.dao.mapper; + + +import cn.org.gitlink.notification.model.dao.entity.PlatformInfo; + +public interface PlatformInfoMapper { + int deleteByPrimaryKey(Integer id); + + int insert(PlatformInfo record); + + int insertSelective(PlatformInfo record); + + PlatformInfo selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(PlatformInfo record); + + int updateByPrimaryKey(PlatformInfo record); +} \ No newline at end of file diff --git a/model/src/main/java/cn/org/gitlink/notification/model/dao/mapper/SysNotificationMapper.java b/model/src/main/java/cn/org/gitlink/notification/model/dao/mapper/SysNotificationMapper.java new file mode 100644 index 0000000..acec015 --- /dev/null +++ b/model/src/main/java/cn/org/gitlink/notification/model/dao/mapper/SysNotificationMapper.java @@ -0,0 +1,37 @@ +package cn.org.gitlink.notification.model.dao.mapper; + +import cn.org.gitlink.notification.model.dao.entity.SysNotification; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface SysNotificationMapper extends BaseMapper { + int deleteByPrimaryKey(@Param("platform") String platform, Integer id); + + int insert(@Param("platform") String platform, SysNotification record); + + int insertSelective(@Param("platform") String platform, SysNotification record); + + SysNotification selectByPrimaryKey(@Param("platform") String platform, Integer id); + + int updateByPrimaryKeySelective(@Param("platform") String platform, SysNotification record); + + int updateByPrimaryKey(@Param("platform") String platform, SysNotification record); + + int updateStatusByNotificationId(@Param("platform") String platform, + @Param("notificationId") Integer notificationId, + @Param("status") Byte status); + + int getNewSysNotificationNumber(@Param("platform") String platform, + @Param("receiver") Integer receiver); + + List getUnreadSysNotificationsList(@Param("platform") String platform, + @Param("receiver") Integer receiver, + @Param("status") byte status); + + List getSysNotificationPageList(Page page, String orderBy, + @Param("platform") String platform, + @Param("receiver") Integer receiver); +} diff --git a/model/src/main/java/cn/org/gitlink/notification/model/handler/MetaHandler.java b/model/src/main/java/cn/org/gitlink/notification/model/handler/MetaHandler.java new file mode 100644 index 0000000..a263568 --- /dev/null +++ b/model/src/main/java/cn/org/gitlink/notification/model/handler/MetaHandler.java @@ -0,0 +1,28 @@ +package cn.org.gitlink.notification.model.handler; + +import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; +import org.apache.ibatis.reflection.MetaObject; +import org.springframework.stereotype.Component; + +import java.util.Date; + +@Component +public class MetaHandler implements MetaObjectHandler { + /** + * 更新数据执行 + * @param metaObject + */ + public void updateFill(MetaObject metaObject) { + this.setFieldValByName("updatedAt", new Date(), metaObject); + } + + /** + * 新增数据执行 + * @param metaObject + */ + @Override + public void insertFill(MetaObject metaObject) { + this.setFieldValByName("createdAt", new Date(), metaObject); + this.setFieldValByName("updatedAt", new Date(), metaObject); + } +} diff --git a/model/src/main/java/cn/org/gitlink/notification/model/service/notification/OperateTableService.java b/model/src/main/java/cn/org/gitlink/notification/model/service/notification/OperateTableService.java new file mode 100644 index 0000000..7eea281 --- /dev/null +++ b/model/src/main/java/cn/org/gitlink/notification/model/service/notification/OperateTableService.java @@ -0,0 +1,28 @@ +package cn.org.gitlink.notification.model.service.notification; + +import cn.org.gitlink.notification.model.dao.mapper.OperateTableMapper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; + +@Component +public class OperateTableService { + @Resource + private OperateTableMapper operateTableMapper; + + Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Transactional + public Boolean createTableByPlatform(String platformCode){ + if(operateTableMapper.existTable(platformCode + "_sys_notification") > 0){ + logger.info("该平台已存在:" + platformCode); + return false; + } + operateTableMapper.dropTable(platformCode); + operateTableMapper.createNewTable(platformCode); + return true; + } +} diff --git a/model/src/main/java/cn/org/gitlink/notification/model/service/notification/SysNotificationService.java b/model/src/main/java/cn/org/gitlink/notification/model/service/notification/SysNotificationService.java new file mode 100644 index 0000000..8d5b107 --- /dev/null +++ b/model/src/main/java/cn/org/gitlink/notification/model/service/notification/SysNotificationService.java @@ -0,0 +1,19 @@ +package cn.org.gitlink.notification.model.service.notification; + +import cn.org.gitlink.notification.model.dao.entity.SysNotification; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +public interface SysNotificationService extends IService { + int insertSysNotification(String platform, SysNotification sysNotification); + + int updateStatusByNotificationId(String platform, Integer notificationId, Byte status); + + int getNewSysNotificationNumber(String platform, Integer receiver); + + List getUnreadSysNotificationsList(String platform, Integer receiver); + + Page getAllSysNotificationsPageList(int curPage, int pageSize, String orderBy, String platform, Integer receiver); +} diff --git a/model/src/main/java/cn/org/gitlink/notification/model/service/notification/impl/SysNotificationServiceImpl.java b/model/src/main/java/cn/org/gitlink/notification/model/service/notification/impl/SysNotificationServiceImpl.java new file mode 100644 index 0000000..6da6eb2 --- /dev/null +++ b/model/src/main/java/cn/org/gitlink/notification/model/service/notification/impl/SysNotificationServiceImpl.java @@ -0,0 +1,45 @@ +package cn.org.gitlink.notification.model.service.notification.impl; + +import cn.org.gitlink.notification.model.dao.entity.SysNotification; +import cn.org.gitlink.notification.model.dao.mapper.SysNotificationMapper; +import cn.org.gitlink.notification.model.service.notification.SysNotificationService; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class SysNotificationServiceImpl extends ServiceImpl implements SysNotificationService { + + @Override + public int insertSysNotification(String platform, SysNotification sysNotification) { + return baseMapper.insertSelective(platform, sysNotification); + } + + @Override + public int updateStatusByNotificationId(String platform, Integer notificationId, Byte status) { + return baseMapper.updateStatusByNotificationId(platform, notificationId, status); + } + + @Override + public int getNewSysNotificationNumber(String platform, Integer receiver) { + return baseMapper.getNewSysNotificationNumber(platform, receiver); + } + + @Override + public List getUnreadSysNotificationsList(String platform, Integer receiver) { + List sysNotificationList = baseMapper.getUnreadSysNotificationsList(platform, receiver, (byte) 1); + return sysNotificationList; + } + + @Override + public Page getAllSysNotificationsPageList(int curPage, int pageSize, String orderBy, String platform, Integer receiver) { + Page page = new Page(curPage, pageSize); + List sysNotificationList = baseMapper.getSysNotificationPageList( + page, orderBy, platform, receiver + ); + page.setRecords(sysNotificationList); + return page; + } +} diff --git a/model/src/main/java/resources/application.yml b/model/src/main/java/resources/application.yml new file mode 100644 index 0000000..68da3cd --- /dev/null +++ b/model/src/main/java/resources/application.yml @@ -0,0 +1,7 @@ +spring: + datasource: + # 配置数据源类型 + driver-class-name: com.mysql.jdbc.Driver + url: jdbc:mysql://192.168.199.117/gitlink-notification-system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2B8&allowMultiQueries=true + username: root + password: 950611 \ No newline at end of file diff --git a/model/src/main/java/resources/mapper/notification/OperateTableMapper.xml b/model/src/main/java/resources/mapper/notification/OperateTableMapper.xml new file mode 100644 index 0000000..820952b --- /dev/null +++ b/model/src/main/java/resources/mapper/notification/OperateTableMapper.xml @@ -0,0 +1,26 @@ + + + + + + DROP TABLE IF EXISTS ${tableName}_sys_notification + + + CREATE TABLE ${tableName}_sys_notification ( + `id` int NOT NULL AUTO_INCREMENT, + `sender` int NOT NULL COMMENT '发送者id', + `receiver` int NOT NULL COMMENT '接受者id', + `content` text NOT NULL COMMENT '消息内容', + `notifacation_url` varchar(255) DEFAULT NULL COMMENT '消息跳转url', + `created_at` datetime DEFAULT NULL COMMENT '创建时间', + `status` tinyint(4) NOT NULL COMMENT '消息状态1-未读2-已读3-未删除4-已删除', + PRIMARY KEY (`id`), + KEY `index_on_receiver_and_status` (`receiver`,`status`), + KEY `index_on_status` (`status`)) + + diff --git a/model/src/main/java/resources/mapper/notification/PlatformInfoMapper.xml b/model/src/main/java/resources/mapper/notification/PlatformInfoMapper.xml new file mode 100644 index 0000000..95844e6 --- /dev/null +++ b/model/src/main/java/resources/mapper/notification/PlatformInfoMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + id, platform_code, platform_name, created_at, updated_at, is_delete + + + + delete from gns_platform_info + where id = #{id,jdbcType=INTEGER} + + + insert into gns_platform_info (id, platform_code, platform_name, + created_at, updated_at, is_delete + ) + values (#{id,jdbcType=INTEGER}, #{platformCode,jdbcType=VARCHAR}, #{platformName,jdbcType=VARCHAR}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{isDelete,jdbcType=BIT} + ) + + + insert into gns_platform_info + + + id, + + + platform_code, + + + platform_name, + + + created_at, + + + updated_at, + + + is_delete, + + + + + #{id,jdbcType=INTEGER}, + + + #{platformCode,jdbcType=VARCHAR}, + + + #{platformName,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{isDelete,jdbcType=BIT}, + + + + + update gns_platform_info + + + platform_code = #{platformCode,jdbcType=VARCHAR}, + + + platform_name = #{platformName,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + is_delete = #{isDelete,jdbcType=BIT}, + + + where id = #{id,jdbcType=INTEGER} + + + update gns_platform_info + set platform_code = #{platformCode,jdbcType=VARCHAR}, + platform_name = #{platformName,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + is_delete = #{isDelete,jdbcType=BIT} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/model/src/main/java/resources/mapper/notification/SysNotificationMapper.xml b/model/src/main/java/resources/mapper/notification/SysNotificationMapper.xml new file mode 100644 index 0000000..05fd741 --- /dev/null +++ b/model/src/main/java/resources/mapper/notification/SysNotificationMapper.xml @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + id, sender, receiver, content, notification_url, created_at, status, is_delete + + + + delete from ${platform}_sys_notification + where id = #{id,jdbcType=INTEGER} + + + insert into ${platform}_sys_notification (id, sender, receiver, + content, notification_url, created_at, + status, is_delete) + values (#{id,jdbcType=INTEGER}, #{sender,jdbcType=INTEGER}, #{receiver,jdbcType=INTEGER}, + #{content,jdbcType=VARCHAR}, #{notificationUrl,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, + #{status,jdbcType=TINYINT}, #{isDelete,jdbcType=BIT}) + + + insert into ${platform}_sys_notification + + + id, + + + sender, + + + receiver, + + + content, + + + notification_url, + + + created_at, + + + status, + + + is_delete, + + + + + #{id,jdbcType=INTEGER}, + + + #{sender,jdbcType=INTEGER}, + + + #{receiver,jdbcType=INTEGER}, + + + #{content,jdbcType=VARCHAR}, + + + #{notificationUrl,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{status,jdbcType=TINYINT}, + + + #{isDelete,jdbcType=BIT}, + + + + + update ${platform}_sys_notification + + + sender = #{sender,jdbcType=INTEGER}, + + + receiver = #{receiver,jdbcType=INTEGER}, + + + content = #{content,jdbcType=VARCHAR}, + + + notification_url = #{notificationUrl,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + status = #{status,jdbcType=TINYINT}, + + + is_delete = #{isDelete,jdbcType=BIT}, + + + where id = #{id,jdbcType=INTEGER} + + + update ${platform}_sys_notification + set sender = #{sender,jdbcType=INTEGER}, + receiver = #{receiver,jdbcType=INTEGER}, + content = #{content,jdbcType=VARCHAR}, + notification_url = #{notificationUrl,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + status = #{status,jdbcType=TINYINT}, + is_delete = #{isDelete,jdbcType=BIT} + where id = #{id,jdbcType=INTEGER} + + + update ${platform}_sys_notification set status = #{status} where id = #{notificationId} + + + + + \ No newline at end of file diff --git a/model/src/test/java/cn/org/gitlink/notification/model/ModelApplicationTest.java b/model/src/test/java/cn/org/gitlink/notification/model/ModelApplicationTest.java new file mode 100644 index 0000000..11fc3a6 --- /dev/null +++ b/model/src/test/java/cn/org/gitlink/notification/model/ModelApplicationTest.java @@ -0,0 +1,12 @@ +package cn.org.gitlink.notification.model; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class ModelApplicationTest { + public static void main(String[] args) { + SpringApplication.run(ModelApplicationTest.class, args); + } + +} diff --git a/model/src/test/java/cn/org/gitlink/notification/model/service/notification/ServiceTests.java b/model/src/test/java/cn/org/gitlink/notification/model/service/notification/ServiceTests.java new file mode 100644 index 0000000..7f9f991 --- /dev/null +++ b/model/src/test/java/cn/org/gitlink/notification/model/service/notification/ServiceTests.java @@ -0,0 +1,41 @@ +package cn.org.gitlink.notification.model.service.notification; + + +import cn.org.gitlink.notification.model.ModelApplicationTest; +import cn.org.gitlink.notification.model.dao.entity.SysNotification; +import cn.org.gitlink.notification.model.service.notification.OperateTableService; +import cn.org.gitlink.notification.model.service.notification.SysNotificationService; +import javafx.application.Application; +import junit.textui.TestRunner; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = ModelApplicationTest.class) +public class ServiceTests { + @Autowired + SysNotificationService sysNotificationService; + + @Autowired + OperateTableService operateTableService; + + Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Test + public void test1(){ + int i = sysNotificationService.getNewSysNotificationNumber("gitlink", 234); + logger.info("id:" + i); + } + + @Test + public void test2(){ + operateTableService.createTableByPlatform("trustie"); + } + +} diff --git a/model/src/test/java/resources/application.yml b/model/src/test/java/resources/application.yml new file mode 100644 index 0000000..68da3cd --- /dev/null +++ b/model/src/test/java/resources/application.yml @@ -0,0 +1,7 @@ +spring: + datasource: + # 配置数据源类型 + driver-class-name: com.mysql.jdbc.Driver + url: jdbc:mysql://192.168.199.117/gitlink-notification-system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2B8&allowMultiQueries=true + username: root + password: 950611 \ No newline at end of file