SpringBoot模块化开发
SpringBoot模块化开发
在一个可持续性的后端项目中,分模块开发是很有必要的。通常是按照业务不同开发不同的模块
下方示例一个我搭建的spring boot cli 并没有按照功能模块开发,而是按照mvc分层开发
父级依赖
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http...
ahk的简单使用
ahk全称AutoHotKey
是win上的一个脚本软件
~v & Down::
changeSound("-5")
return
这一段代码,”~”意思为,这组热键的模式不会影响系统本身的按键获取
“&”的意思的两个键触发才会进行执行操作
https://wyagd001.github.io/zh-cn/docs/Hotkeys.htm
changeSound是调用了
toggleSound() {
SoundSet +1, , MUTE
}
turnOnSound() {
SoundSet 0, , MUTE
}
SoundIsMute() {
SoundGet, OutputVar, , MUTE
return OutputVa...
自定义ImageView使图片能够双指放大
自定义ImageView使图片能够双指放大
package com.lenovo.smarttraffic.ui.diyImageView;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.ScaleGestureDet...
使用zxing生成二维码
使用zxing生成二维码
private void getQR(ImageView imageView, String test) {
int width = imageView.getWidth();
int height = imageView.getHeight();
try {
HashMap<EncodeHintType, Object> hints = new HashMap<>();
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
hints.put(EncodeHintType.MARGIN, 0);
Bi...
View_binding----简单实现组件的依赖注入
以前一直都是在用黄油刀,最近发现黄油刀的作者说不维护了,转战View_Binding
Activity使用方法
setContentView 本质是将根视图绑定在上下文中,无需提供view就可以进行 FindViewById
使用黄油刀也是根据传入的上下文来代理增强 实例化对象
使用View_Binding 的步骤十分简单
将Android studio 升级到3.6以上
在gradel文件的android标签中开启视图绑定
//构建功能
buildFeatures {
//设置开启view-binding
viewBinding true
}
忽略布局请给布局添加标签
&l...
volley的增强写法
这种方法在请求时使用的是静态的RequestQueue,上下文从框架中获得全局的静态context,在进行循环请求的时候不会锁死context,可以解决oom问题
package com.lenovo.smarttraffic.util;
import android.content.Context;
import android.util.Log;
import android.widget.Toast;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.t...
MPAndroidChart的画图方式
MPAndroidChart的画图方式
study by https://www.cnblogs.com/r-decade/p/6241693.html https://blog.csdn.net/u014136472/article/details/50298213
LineChart
BarChart
ScatterChart
CandleStickChart
PieChart
BubbleChart or RadarChart
刷新api
invalidate() : 在chart中调用会使其刷新重绘
notifyDataSetChanged() : 让chart知道它依赖的基础数据已经改变,并执行所有必要的...
共计 67 篇文章,9 页。