一.product模块
1.配置config bootstrap.propeties
spring.application.name=gulimall-product
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.namespace=productb734b4cb-d519-41ad-8c75-c8427a61ec53
2.application.yml 注册中心
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
3.网关中下面的配置放在最下面
- id: admin_route
uri: lb://renren-fast
predicates:
- Path=/api/**
filters:
- RewritePath=/api/(?<segment>.*),/renren-fast/$\{segment}
4.前端删除tree子节点
<template>
<el-tree :data="menus" :props="defaultProps" @node-click="handleNodeClick">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span>
<el-button type="text" size="mini" @click="() => append(data)">Append</el-button>
<el-button type="text" size="mini" @click="() => remove(node, data)">Delete</el-button>
</span>
</span>
</el-tree>
</template>
5.后端逻辑删除
①可以省略
mybatis-plus:
mapper-locations: classpath*:/mapper/**/*.xml
global-config:
db-config:
id-type: auto
logic-delete-value: 1
logic-not-delete-value: 0
②给Bean加上逻辑删除注解@TableLogic
//1为不删除,0为删除
@TableLogic(value = "1",delval ="0")
private Integer showStatus;
将gulimall包下log设为debug
logging:
level: com.atguigu.gulimall:debug