Maven-optional和scope
参考Maven中optional和scope元素的使用,你弄明白了? - 知乎 (zhihu.com) 说明在Maven项目中,恰当的使用 optional 和 scope 配置,可以在很大程度上减少jar包的大小,提升编译和发布速度 optional optional是Maven依赖jar时的一个选项,不设置optional(默认)或者optional是false,表示传递依赖。设置 optional 为...
Web-removeEventListener不生效问题
在使用 addEventListener 添加监听后,需要通过 removeEventListener 移除通知,但是不生效,所以需要注意: 添加 跟 移除 的监听方法要一致,也就是监听绑定的是哪个 function,移除也得一致。 错误写法12345678910// 添加消息监听window.addEventListener('message', function (msg) { // 输出 console.log(msg) // 移除消息监听 window.removeEventListener('message', function (msg) { // 输出 console.log(msg) }, false)}) 正确写法123456789// 添加消息监听window.addEventListener('message', receiveMessage)// 接收消息function receiveMessage (msg) { ...
MySQL-全文索引
说明 模糊查询替代方案。引入全文检索字段进行模糊查询 目前简单使用,不再封装复杂使用情况 创建全文索引1234567# 方式一create fulltext index $index_name on $table_name($column) with parser ngram;# create fulltext index $index_name on $table_name($column1, $column2) with parser ngram;# 方式二alter table $table_name add fulltext index $index_name($column) with parser ngram;# alter table $table_name add fulltext index $index_name($column1, $column2) with parser ngram; 删除全文索引12345# 方式一drop index $index_name on $table_name;# 方式二alter table $table_name...
Spring-注册Bean
发表于|Spring-注册Bean
静态注册@Bean、@Component、@Service 等@Import12@Import(DatabaseConfig.class)@Import({Student.class, Teacher.class}) 动态注册自动注册@ImportSelector 实现 ImportSelector 接口的方法 selectImports 返回要注入类的名称的数组 1 手动注册ImportBeanDefinitionRegistrar 实现 ImportBeanDefinitionRegistrar 接口的方法 registerBeanDefinitions。支持自定义Bean 的名称 DefaultListableBeanFactory - registerSingleton12345678ApplicationContext applicationContext = SpringContextUtils.getApplicationContext(); DefaultListableBeanFactory beanFactory =...
Vue-router-传参与接收
发表于|Vuerouter-传参与接收
name + params 跳转页面12345// 跳转页面-传参数this.$router.push({ name:'anotherPage', params:{id:1}});// 接收参数this.$route.params.id path + query 跳转页面12345// 跳转页面-传参数this.$router.push({ path:'/anotherPage', query:{id:1}});// 接收参数this.$route.query.id 区别 path的query传参的参数会带在url后边展示在地址栏(/anotherPage?id=1),name的params传参的参数不会展示到地址栏 由于动态路由也是传递params的,所以在 this.$router.push() 方法中path不能和params一起使用,否 params将无效,需要用 name 来指定页面 js...
Scss-vue-cli
发表于|前端Scss-vue-cli
引入 sass-loader node-sass方式一:创建项目时选择预处理器sass12345# 1. 创建项目,示例 vue create vuedemo# 2. 移动上下键,选择 Manually select features# 3. 移动上下键在CSS Pre-processors,点击空格键选择CSS-processors# 4. 选择 SCSS/SASS 作为我们的CSS预处理器# 完成后项目会帮我们自动安装sass-loader 以及 node-sass依赖。另外版本需要与当前node版本相匹配 方式二:手动安装sass-loader 如果在创建项目没有选择CSS 预处理器,我们也可以手动安装sass-loader以及 node-sass来集成scss 12# 安装指定版本,与当前 node16.x 版本相匹配yarn add sass-loader@10.2.0 node-sass@6.0.1 -D vue-cli3 自动引入变量文件 安装 style-resources-loader 12vue add style-resources-loader...
SpringBoot-定时调度
发表于|SpringBoot定时调度
在SpringBoot中,使用@EnableScheduling注解可以开启定时调度功能 具体使用方法可以参考下面的代码示例: 1234567@SpringBootApplication@EnableSchedulingpublic class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); }} 其中,@EnableScheduling注解用于开启定时调度功能,而不需要再添加其他注解。 如果您需要自定义定时任务的执行时间,可以使用@Scheduled注解来声明一个定时任务,例如: 12345678@Componentpublic class MyTask { //@Scheduled(cron = "0 0 1 * * ?") //每天凌晨1点执行一次 @Scheduled(cron = "0/10 *...
Java-JUnitPerf-性能测试
说明JUnitPerf 是一个基于 JUnit 框架的性能测试工具,可以测试 Java 应用程序在不同负载下的性能表现 步骤引入依赖12345<dependency> <groupId>com.github.houbb</groupId> <artifactId>junitperf</artifactId> <version>2.0.0</version></dependency> 测试用例一123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657import com.github.houbb.junitperf.core.annotation.JunitPerfConfig;import...
公告
风雨无阻,灯火为你,星光虽微,照耀夜空。
最新文章
归档
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2025 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2024 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2023 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2022 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2021 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2020 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1
- 2019 1