【雷丰阳-谷粒商城 】【分布式基础篇-全栈开发篇】【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

参考

雷丰阳: 谷粒商城


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


相关推荐
躺不平的理查德4 小时前
General Spark Operations(Spark 基础操作)
大数据·分布式·spark
talle20214 小时前
Zeppelin在spark环境导出dataframe
大数据·分布式·spark
渣渣盟4 小时前
大数据开发环境的安装,配置(Hadoop)
大数据·hadoop·分布式
Angindem5 小时前
SpringClound 微服务分布式Nacos学习笔记
分布式·学习·微服务
龙仔72513 小时前
离线安装rabbitmq全流程
分布式·rabbitmq·ruby
〆、风神16 小时前
Spring Boot 整合 Lock4j + Redisson 实现分布式锁实战
spring boot·分布式·后端
胡萝卜糊了Ohh17 小时前
kafka
分布式·kafka
桑榆080619 小时前
Spark-Streaming核心编程
大数据·分布式·spark
nbsaas-boot20 小时前
分布式微服务架构,数据库连接池设计策略
分布式·微服务·架构