【雷丰阳-谷粒商城 】【分布式基础篇-全栈开发篇】【00】补充


持续学习&持续更新中...

守破离


【雷丰阳-谷粒商城 】【分布式基础篇-全栈开发篇】【00】补充

WindowsCMD

插件

IDEA

  • MybatisX
  • lombok

VsCode


Maven

G:\apache-maven-3.6.1-bin\apache-maven-3.6.1\conf\settings.xml:

xml 复制代码
        <mirror>
            <id>nexus-aliyun</id>
            <mirrorOf>central</mirrorOf>
            <name>Nexus aliyun</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        </mirror>

配置 jdk1.8 编译项目:

xml 复制代码
        <profile>
            <id>jdk-1.8</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <jdk>1.8</jdk>
            </activation>
            <properties>
                <maven.compiler.source>1.8</maven.compiler.source>
                <maven.compiler.target>1.8</maven.compiler.target>
                <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
            </properties>
        </profile>

vagrant

Docker

解决MySQL连接慢问题

启动(自动)Docker

注意切换到root用户

远程访问MySQL

MyBatisPlus

xml 复制代码
<!--            导入mysql驱动    -->
<!--         https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.17</version>
        </dependency>
yml 复制代码
spring:
  datasource:
    username: root
    password: root
    url: jdbc:mysql://192.168.56.10:3306/gulimall_pms?useSSL=false
    driver-class-name: com.mysql.jdbc.Driver

mybatis-plus:
  global-config:
    db-config:
      id-type: auto # 主键自增
#   mapper-locations: classpath:/mapper/**/*.xml
                    # classpath代表只扫描自己的
  mapper-locations: classpath*:/mapper/**/*.xml

Java里面没有Longblob类型,这个用renren-fast-generator自动生成的类型没有自动转换,改成 byte[]

Vue模块化开发

项目结构

VsCode 添加用户代码片段(快速生成Vue模板)

文件-->首选项-->用户代码片段-->点击新建代码片段--取名 vue.json 确定

json 复制代码
{
	"生成 vue 模板": {
		"prefix": "vue",
		"body": [
			"<template>",
			"<div></div>",
			"</template>",
			"",
			"<script>",
			"//这里可以导入其他文件(比如:组件,工具 js,第三方插件 js,json文件,图片文件等等)",
			"//例如:import 《组件名称》 from '《组件路径》';",
			"",
			"export default {",
			"//import 引入的组件需要注入到对象中才能使用",
			"components: {},",
			"props: {},",
			"data() {",
			"//这里存放数据",
			"return {",
			"",
			"};",
			"},",
			"//计算属性 类似于 data 概念",
			"computed: {},",
			"//监控 data 中的数据变化",
			"watch: {},",
			"//方法集合",
			"methods: {",
			"",
			"},",
			"//生命周期 - 创建完成(可以访问当前 this 实例)",
			"created() {",
			"",
			"},",
			"//生命周期 - 挂载完成(可以访问 DOM 元素)",
			"mounted() {",
			"",
			"},",
			"beforeCreate() {}, //生命周期 - 创建之前",
			"beforeMount() {}, //生命周期 - 挂载之前",
			"beforeUpdate() {}, //生命周期 - 更新之前",
			"updated() {}, //生命周期 - 更新之后",
			"beforeDestroy() {}, //生命周期 - 销毁之前",
			"destroyed() {}, //生命周期 - 销毁完成",
			"activated() {}, //如果页面有 keep-alive 缓存功能,这个函数会触发",
			"}",
			"</script>",
			"<style lang='scss' scoped>",
			"//@import url($3); 引入公共 css 类",
			"$4",
			"</style>"
		],
		"description": "生成 vue 模板"
	},
	"http-get 请求": {
		"prefix": "httpget",
		"body": [
			"this.\\$http({",
			"url: this.\\$http.adornUrl(''),",
			"method: 'get',",
			"params: this.\\$http.adornParams({})",
			"}).then(({data}) => {",
			"})"
		],
		"description": "httpGET 请求"
	},
	"http-post 请求": {
		"prefix": "httppost",
		"body": [
			"this.\\$http({",
			"url: this.\\$http.adornUrl(''),",
			"method: 'post',",
			"data: this.\\$http.adornData(data, false)",
			"}).then(({ data }) => { });"
		],
		"description": "httpPOST 请求"
	}
}

@RequestBody

代码地址

https://github.com/lpruoyu/gulimall

参考

雷丰阳: 谷粒商城


本文完,感谢您的关注支持!


相关推荐
Pniubi15 小时前
分布式锁分类讲解
分布式
nvd1116 小时前
深入剖析:GCP Pub/Sub 与 Apache Kafka 对消息处理延迟与消费者卡死的处理机制异同
分布式·kafka·apache
我不是阵雨17 小时前
分布式事务难题与实战解法全解析
分布式·微服务·架构
song50117 小时前
React Native for OpenHarmony 实战:三方库 react-native-parallax-scroll-view 的鸿蒙化适配指南
分布式·react native·react.js·transformer·harmonyos
做个文艺程序员20 小时前
MQ第03篇:RabbitMQ进阶实战:Topic路由+死信队列+延迟消息,SaaS订单超时取消完整方案
分布式·消息队列·rabbitmq·死信队列·延迟队列
风花一世月20 小时前
[特殊字符] 我把一套分布式消防方案做成了能跑的 3D 沙盘(三架无人机共用一根水带,在线直接玩)
分布式·3d·ai·无人机
我不是阵雨1 天前
如何拿捏分布式四大模式?
分布式
吴声子夜歌1 天前
Docker入门与实战——实战案例(分布式处理与大数据平台)
大数据·分布式·docker
bksczm1 天前
Redis基础篇之初识分布式
数据库·redis·分布式
此时不提桶,更待何时1 天前
06-18-A-RabbitMQ消息特性与消费机制详解
分布式·rabbitmq