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:
2025-12-19 18:33:25 +08:00
parent a544eb6d0e
commit efa56da5b2
12 changed files with 204 additions and 55 deletions

View 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;
}

View File

@@ -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:

View File

@@ -100,7 +100,7 @@
</springProfile>
<!-- 默认配置 -->
<springProfile name="!dev & !test & !prod">
<springProfile name="!dev &amp; !test &amp; !prod">
<root level="INFO">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="ASYNC_FILE"/>