- 浏览: 22786 次
最新评论
文章列表
show index from tb_cover;
ALTER TABLE tb_cover DROP INDEX coverpage;
ALTER TABLE tb_cover ADD INDEX coverpage (CoID,CreateUserID,State,AreaID,EnableTime,pointX,pointY);
<insert id="insert" parameterType="wfx.service.cover.entity.device.Cover"
useGeneratedKeys="true" keyProperty="coverID">
获取useGeneratedKeys="true" keyProperty="coverID"获取自动生成的ID
,放到实体字段coverID中
Note:传入参数必须是
Page page = PageHelpe ...
excludePathPatterns("/**.html","/v2/api-docs","/swagger-resources/**","/webjars/**");
chrome://flags/
启用实验性 JavaScript Mac, Windows, Linux, Chrome OS, Android
keystore.jks生成步骤
tomcat 证书
https://www.pianyissl.com/support/page/25
keytool -genkey -alias server -keyalg RSA -keysize 2048 -keystore C:\keystore.jks -storepass password -keypass password
keytool -certreq -alias server -sigalg SHA1withRSA -file C:\req.csr -keystore C:\keystore.jks -keypass password ...
keytool -genkey -keystore "D:\localhost.keystore" -alias localhost -keyalg RSA
在D盘生成localhost.keystore文件
tomcat server.xml添加
<Connector port="9999" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true" maxThreads="150" scheme=&qu ...
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2).select()
.apis(RequestHandlerSelectors.basePackage("report.controller"))
.paths(PathSelectors.any()).build();
}
}
NOTE
使用fastjson序列化的 ...
docker pull gitlab/gitlab-ce
docker run \
-d \
-h gitlab.xxx.com \
-p 22:22 \ SSH端口
-p 80:80 \ HTTP端口
-v ~/gitlab/etc:/etc/gitlab \
-v ~/gitlab/log:/var/log/gitlab \
-v ~/gitlab/opt:/var/opt/gitlab \
--name gitlab \
gitlab/gitlab-ce
git设置
git config --global user.name "Administrator& ...
docker pull jenkinsci/Jenkins
docker run \
-d \
-p 8080:8080 \
-v ~/jenkins:/var/jenkins_home \
--name jenkins \
-u root \
jenkinsci/Jenkins
-u root root权限
https://github.com/jenkinsci/docker Docker源码
docker logs -f Jenkins
-f 查看日志最新内容
系统管理—>配置maven
安装git插件
--link gitlab:gitlab.xxx.com
...
Dockerfile
FROM java
MAINTAINER "zhan5"<822786603@qq.com>
ADD @project.build.finalName@.jar app.jar
EXPOSE 8080
CMD java -jar app.jar
maven插件
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
< ...
FROM centos:latest 基础镜像
MAINTAINER "zhan5"<822786603@qq.com> 维护者信息
ADD jdk-8u91-linux-x64.tar.gz /opt 设置添加到容器的文件
RUN ln -s /opt/jdk1.8.0_91 /opt/jdk 镜像执行过程中执行的命令
ENV JAVA_HOME /opt/jdk
ENV PATH $JAVA_HOME/bin:$PATH 设置环境变量
CMD java -version 容器启动时执行的命令
docker build -t zhan5/java . 读取Do ...
镜像:
docker pull centos 拉取
docker save centos > centos.tar 导出
docker load < centos.tar 导入
容器:
docker run -i -t centos /bin/bash
-i 打开标准输入STDIN
-t 分配伪终端pseudo-TTY
centos 镜像名
/bin/bash 运行容器中bash程序
docker attach 197beb401e65 进入容器
docker exec -i -t 197beb401e65 ls -l 列出容器当前目录结构
docker rm -f $(do ...
场景:
maven项目源代码copy出来,在另一台电脑的eclipse上导入,存在中文乱码现象
解决方案:
找到乱码的java文件,在notepad上,格式栏中显示“以ansi格式编码”(对应gbk),显示正常。
eclipse->window->preferences->General->Content Types->Text->Java Source File
Default encoding中输入GBK,update后,重新import后正常显示。
其它文件乱码处理参照上述操作
sql中try catch语句
BEGIN TRY
END TRY
BEGIN CATCH
END CATCH
sql抛出异常
RAISERROR (@ErrorMessage,
@ErrorSeverity,
@ErrorState
);
@ErrorSeverity
[0,10]的闭区间内,不会跳到catch;
如果是[11,19],则跳到catch;
如果[20,无穷),则直接终 ...
declare @start DateTime
declare @end DateTime
set @start=getdate()
set @end=getdate()
print cast(datediff(s,'2016-10-10 00:00:00','2016-10-10 00:00:01') as varchar)