随笔分类 - Java框架
摘要:1.单application yml > properties 当前项目的根目录/config/ 【jar包内config目录下】 # 最高优先级 当前项目的根目录/ 【jar包内】 # 第二优先级 类路径(在resources目录下)/config/ 【classpath路径下,即jar包所在目录
阅读全文
摘要:1.配置文件 spring: datasource: food: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver jdbc-url: jdbc:mysql://43.13
阅读全文
摘要:https://www.xuxueli.com/xxl-job/#%E3%80%8A%E5%88%86%E5%B8%83%E5%BC%8F%E4%BB%BB%E5%8A%A1%E8%B0%83%E5%BA%A6%E5%B9%B3%E5%8F%B0XXL-JOB%E3%80%8B 1.调度中心 运行调
阅读全文
摘要:1.公共mapper.xml 其他模块的配置 mybatis: mapper-locations: classpath*:org/example/common/web/mappers/*.xml typeAliasesPackage: org.example.common.web.domain #
阅读全文
摘要:@Scheduled(cron = "0 0 */3 * * ?")//定时任务注解 public void fun() { }
阅读全文
摘要:1.依赖 <!--状态机--> <dependency> <groupId>org.springframework.statemachine</groupId> <artifactId>spring-statemachine-core</artifactId> <version>2.0.1.RELE
阅读全文
摘要:1.@RequestParam Content-Type: application/x-www-form-urlencoded 一般是form直接发送请求 postman 使用form-data来传值 2.@RequestBody contentType: "application/json; ch
阅读全文
摘要:1.父模块 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.0.5</version> </parent> <pro
阅读全文
摘要:1.动态SQL Mybatis提供的拼接Sql语句的机制。 1.if <select id="listSearchStudents" resultType="entity.Student"> select * from stu where sname = #{sname} <if test="pho
阅读全文
摘要:Java17以上 1.依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.0.0</version> <relat
阅读全文
摘要:## 1.依赖 - 父工程 ```xml org.springframework.boot spring-boot-starter-parent 2.2.4.RELEASE org.springframework.cloud spring-cloud-dependencies Hoxton.SR1
阅读全文
摘要:## 1.什么是微服务 微服务架构是一个分布式系统, 按照业务进行划分成为不同的服务单元, 解决单体系统性能等不足。 微服务是一种架构风格,一个大型软件应用由多个服务单元组成。系统中的服务单元可以单独部署,各个服务单元之间是松耦合的。 ## 2.微服务之间通信 - Rest Http协议 RestT
阅读全文
摘要:## 1.下载安装包解压 ## 2.mysql配置 #### 2.1 启动binlog功能 - 查看是否启动 ``` show variables like 'binlog_format%' ``` - 修改my.cnf配置 ``` log-bin=mysql-bin #添加这一行就 ok binl
阅读全文
摘要:## 1.下载安装包解压 ## 2.修改配置文件 - 新建data,log文件夹 - 修改conf/zoo.cfg ``` dataDir=D:\Code\ZooKeeper\zookeeper-3.4.11\data dataLogDir=D:\Code\ZooKeeper\zookeeper-3
阅读全文
摘要:## 1.什么是配置中心 在微服务架构中,当系统从一个单体应用,被拆分成分布式系统上一个个服务节后,配置文件也必须跟着迁移(分割) ,这样配置就分散了,不仅如此,分散中还包含着冗余,如下图: 配置中心将配置从各应用中剥离出来,对配置进行统一管理,应用自身不需要自身去管理配置 
浙公网安备 33010602011771号