07 2019 档案
摘要:--mysql常用字段类型如图 --mybatis使用Map<String,Object>映射,会将tinyint映射成Integer类型、decimal映射成BigDecimal类型 所以程序在处理这些字段时,需要做个强转操作,例如 Map<String, Object> orderDetails
阅读全文
摘要:1、tomcat启动之前,修改apache-tomcat-8.5.34\bin\catalina.bat文件,设置调试端口 如下设置(windows环境): rem 此为注释set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,su
阅读全文
摘要:启动报错关键信息如下: Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [] due to a StackOverflowError
阅读全文
摘要:--最佳实践配置(.yml) --最佳实践(注意在springboot的.yml中配置gs.oracle,若使用gs_oracle,@@ConfigurationProperties会提示使用规范配置) --最佳实践DbConnect
阅读全文
摘要:1、如果数据源是oracle(mysql结尾是可以使用";"的),sql字符串中结尾处禁止使用分号";",不然会报错:java.sql.SQLException: ORA-00911: 无效字符 2、使用jdbc连接oracle数据库时,如果驱动名使用“oracle.jdbc.driver.Orac
阅读全文
摘要:--例如下载jar到本地(例如经常用到的oracle数据库驱动) --前提本地已将安装maven并配置好环境,cmd并切换到jar包的文件夹下,执行以下命令,注意DgroupId、DartifactId、Dversion --Dfile即是当前文件夹下jar包的名称 mvn install:inst
阅读全文
摘要:工作中在使用git时,有时候导出项目后需要删除.git文件,然后自己重新修改项目,但是导入到idea中总是会报: IDEA *.is registered as a Git root, but no Git repositories were found there. 解决办法如下:File->Se
阅读全文
摘要:1、使用该注解需要引入依赖: <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.16.12</version> <scope>provided</scope> </
阅读全文
摘要:1、修改pom.xml中相关 <artifactId>seal-hn</artifactId><name>seal-hn</name><description>seal-hn</description><finalName>seal-hn</finalName> 2、idea-》File-》Proj
阅读全文
摘要:0-win下载地址:https://github.com/microsoftarchive/redis/releases linux版本地址:http://www.redis.cn/ 1、不是以widows服务列表的形式启动 1-1、切换到redis安装目录下,如果没有修改密码需要 直接双击redi
阅读全文
摘要:--查看数据库版本 SELECT VERSION(); --查看字符编码与安装路径 SHOW VARIABLES LIKE '%char%';
阅读全文
摘要:SimpleDateFormat并不是线程安全的,因为在SimpleDateFormat中持有一个Calendar类对象在Parse 和Format方法时会调用calendar.setTime(date)方法,如果在多线程环境下运行,会出现线程安全问题,为了解决这个问题,可以使用以下方法: 1.需要
阅读全文
摘要:/** * 32位去除'-'的UUID */ public static String getUUID() { String uuid = java.util.UUID.randomUUID().toString(); uuid = uuid.replace("-", ""); return uui
阅读全文
摘要:版本号版本号,顾名思义,系统、架包、软件的标识号。版本号的数字信息通俗易懂, 格式:主版本号+次版本+(修正版本号build-可选)+(编译版本号-可选)+英文常见号(重点)。 常见号:英文各种架包名,Maven的依赖,官网API时,常见,GA、SNAP-SHOT、RELEASE、ALPHA、BET
阅读全文
摘要:--定义额外的.properties配置文件,并引入配置
阅读全文
摘要:String json = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n "; json = json.replaceAll("\r|\n|\t", "");
阅读全文
摘要:--安装包官网下载地址:https://dev.mysql.com/downloads/mysql/5.7.html#downloads --安装教程参见:https://www.cnblogs.com/rysinal/p/7565259.html --授权连接参见:https://www.cnbl
阅读全文
摘要:--随笔 DELIMITER $$ USE `local_hnyz`$$ DROP FUNCTION IF EXISTS `init_data`$$ CREATE DEFINER=`root`@`localhost` FUNCTION `init_data`() RETURNS INT(11)BEG
阅读全文
摘要:git config --global user.name 'sss' git config --global user.email 'huahua@163.com' cd d:/mywork git init cd.>susu.txt git status git add susu.txt git
阅读全文
摘要:查看方法实现:ctrl+alt+鼠标实现父类方法:ctrl+i查看方法的具体实现:ctrl+alt(鼠标再点击方法)快速导包:alt+enter格式化:Ctrl+Alt+L格式化当前行:ctrl+shift+enter插入上一空白行:ctrl+alt+enter插入下一空白行:shift+enter
阅读全文
摘要:--添加依赖 <!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper --><dependency> <groupId>com.github.pagehelper</groupId> <artifactId>p
阅读全文
摘要:-- 最佳实践 <select id="getSealByMap" parameterType="map" resultType="map"> SELECT ls.`id`,ls.`in_date`,ls.`name`,ls.`seal_type`,ls.`crop_no`,sos.`SEAL_OR
阅读全文
摘要:--pom.xml添加插件 <build> <finalName>hnapi</finalName> <plugins> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plu
阅读全文
摘要:--异常类可以按需要自定义package com.dhht.wechat.exception;import com.alibaba.fastjson.JSONObject;import org.springframework.web.bind.annotation.ControllerAdvice;
阅读全文
摘要:--添加依赖 <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox --><dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artif
阅读全文
摘要:--json为json串JSONObject obj = JSON.parseObject(json);String x = obj.getString("cropId");JSONArray arr = obj.getJSONArray("seals");JSONObject usr = obj.
阅读全文
摘要:SELECTms.id,ms.name,ms.address,ms.mobile AS phone,ms.UUID,(case when ce.score is null then 0 else ce.score end) as score,-- ce.score,mse.longitude,mse
阅读全文
摘要:--主配置文件(.yml) mybatis: mapper-locations: classpath:mapper/*.xml type-aliases-package: com.dhht.model config-location: classpath:mybatis-config.xml --启
阅读全文
摘要:DELIMITER $$ USE `local_hnyz`$$ DROP FUNCTION IF EXISTS `GET_ORDER_STATUS`$$ CREATE DEFINER=`root`@`localhost` FUNCTION `GET_ORDER_STATUS`(orderId VAR
阅读全文
摘要:-- ORDER_TIME datetime NOT NULL(字段类型)SELECTso.`ID`,so.`ORDER_TIME`,NOW(),CONCAT(ROUND(TIMESTAMPDIFF(MINUTE,so.`ORDER_TIME`,NOW())/60,1),'') AS hourLat
阅读全文
摘要:-- DESC 降序时候默认null值排在后面、ASC升序时默认null值排在前面,可使用 IS NULL处理 ORDER BY score desc,gmPrice IS NULL,gmPrice,avg_time IS NULL,avg_time
阅读全文
摘要:-- in_date datetime NULLDATE_FORMAT(ls.`in_date`,'%Y-%m-%d %T')AS create_time
阅读全文