持续学习&持续更新中…
守破离
【雷丰阳-谷粒商城 】【分布式基础篇-全栈开发篇】【00】补充
- WindowsCMD
- 插件
- IDEA
- VsCode
- Maven
- vagrant
- Docker
- 解决MySQL连接慢问题
- 启动(自动)Docker
- 注意切换到root用户
- 远程访问MySQL
- MyBatisPlus
- Vue模块化开发
- 项目结构
- VsCode 添加用户代码片段(快速生成Vue模板)
- @RequestBody
- 代码地址
- 参考
WindowsCMD
插件
IDEA
- MybatisX
- lombok
VsCode
Maven
G:\apache-maven-3.6.1-bin\apache-maven-3.6.1\conf\settings.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 编译项目:
<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
<!-- 导入mysql驱动 -->
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>8.0.17</version></dependency>
spring:datasource:username: rootpassword: rooturl: jdbc:mysql://192.168.56.10:3306/gulimall_pms?useSSL=falsedriver-class-name: com.mysql.jdbc.Drivermybatis-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 确定
{"生成 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
参考
雷丰阳: 谷粒商城
本文完,感谢您的关注支持!