Java注解示例-自定义Junit框架
https://zhuanlan.zhihu.com/p/60966151
别忘了设置保留策略为RetentionPolicy.RUNTIME。
代码结构
MyBefore注解
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface MyBefore {
}
MyTest注解
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface M...
将SpringBoot应用程序安装成windows服务启动
下载Windows Service Wrapper
本文下载了winsw-2.3.0-bin.exe。
新建一个目录aiplatformService
在目录里面新建一个aiplatformService.xml,同时把winsw-2.3.0-bin.exe重命名陈aiplatformService.exe
必须这么做,否则无法安装启动服务。
编辑aiplatfomService.xml文件
<?xml version="1.0" encoding="utf-8" ?>
<service>
&l...
springboot + mybatis整合及pagehelper分页
本文链接:https://blog.csdn.net/he446242377/article/details/92062619
流程:
一. 配置pom.xml文件
二. 配置application.yml文件
三. 程序启动类中使用@MapperScan()注解指定mapper(dao)接口路径
四. 使用pagehelper实现分页
一、配置pom.xml文件
<!-- boot整合web模块的依赖,此依赖中包含了springmvc的依赖 -->
<dependency>
...
在web.xml中添加编码过滤器仍不能解决乱码。
在tomcat安装目录的conf/server.xml中修改配置如下:
<Connector URIEncoding="UTF-8" port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
如果是eclipse环境,要在Servers项目下的tomcat目录下找到server.xml修改,才能生效。
//禁用win10兼容性遥测
sc delete DiagTrack
sc delete dmwappushservice
echo "" > C:\\ProgramData\\Microsoft\\Diagnosis\\ETLLogs\\AutoLogger\\AutoLogger-Diagtrack-Listener.etl
reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection /v AllowTelemetry /t REG_DWORD /d 0 /f
去掉c:\windows\system32\Co...
- « 前一页
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- ...
- 18
- 后一页 »