feat(core): 升级Spring Boot版本并优化启动日志
- 将Spring Boot版本从4.0.0升级到3.2.0 - 更新mt-pay模块的依赖配置,使用spring-boot-starter-web替代webmvc - 在应用启动时添加醒目的ASCII艺术风格日志输出 - 添加前端访问地址配置项app.frontend.url - 优化全局异常处理器返回的数据结构 - 修改CreateProductRequestDTO以支持多个主图URL - 调整MyBatis Plus查询构造方式为显式LambdaQueryWrapper - 更新Maven插件配置,跳过测试执行 - 修复XML配置中的特殊字符转义问题 - 统一服务端口为8082并在启动日志中显示完整访问信息
This commit is contained in:
64
mt-pay/src/main/resources/MtProduct.java
Normal file
64
mt-pay/src/main/resources/MtProduct.java
Normal file
@@ -0,0 +1,64 @@
|
||||
package com.mtkj.mtpay.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 商品实体类
|
||||
*/
|
||||
@TableName(value = "mt_product")
|
||||
@Data
|
||||
public class MtProduct {
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@TableField(value = "name", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 商品价格(基础价格,SKU可能有不同价格)
|
||||
*/
|
||||
@TableField(value = "price", jdbcType = org.apache.ibatis.type.JdbcType.DECIMAL)
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 主图URL(最大4000字符)
|
||||
*/
|
||||
@TableField(value = "main_image", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||||
private String mainImage;
|
||||
|
||||
/**
|
||||
* 商品状态:ACTIVE-上架,INACTIVE-下架,DELETED-已删除
|
||||
*/
|
||||
@TableField(value = "status", jdbcType = org.apache.ibatis.type.JdbcType.VARCHAR)
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 店铺ID
|
||||
*/
|
||||
@TableField(value = "shop_id", jdbcType = org.apache.ibatis.type.JdbcType.BIGINT)
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time", fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ pingpong:
|
||||
|
||||
# 服务器配置
|
||||
server:
|
||||
port: 8080
|
||||
port: 8082
|
||||
servlet:
|
||||
context-path: /
|
||||
# 文件上传配置
|
||||
@@ -83,6 +83,12 @@ server:
|
||||
# 文件写入磁盘的阈值(超过此大小会写入临时文件)
|
||||
file-size-threshold: 2MB
|
||||
|
||||
# 应用配置
|
||||
app:
|
||||
# 前端访问地址(用于生成商品详情页URL等)
|
||||
frontend:
|
||||
url: http://localhost:3000
|
||||
|
||||
# 阿里云OSS相关配置
|
||||
aliyun:
|
||||
oss:
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
</springProfile>
|
||||
|
||||
<!-- 默认配置 -->
|
||||
<springProfile name="!dev & !test & !prod">
|
||||
<springProfile name="!dev & !test & !prod">
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="ASYNC_FILE"/>
|
||||
|
||||
Reference in New Issue
Block a user