03 2021 档案
摘要:JAVA知识深度回顾总结-第一天 八种基本数据类型的大小,以及他们的封装类 分类 - 类型—————范围——————封装类 整型 byte ———- [-128~127] ———— Byte short ——– [-2^15~2^15 - 1] —— Short int ———– [-2^31~2^
阅读全文
摘要:突然间发现 分页的total 数据错误;打开调试之后发现 count 语句都是正常执行的 最后 发现是 传入的泛型实体类不一致 修改后即正常!
阅读全文
摘要:String name=request.getParameter("name"); name = java.NET.URLDecoder.decode(name,"UTF-8");
阅读全文
摘要:1.vue项目基于webpack在config目录下的index.js在cssSourceMap后面添加 proxyTable: { '/': { target: "http://localhost:3000/", //后端地址 changeOrigin: true, //允许跨域 pathRewr
阅读全文
摘要:在项目中引入了freemarker的依赖包。但是在log4j.properties文件中没有配置对应的日志级别引起的红色警告。如下: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-st
阅读全文
摘要:1、设置ContentType response.setContentType("application/x-download"); 2、设置文件名,并指定编码格式 fileName = URLEncoder.encode("浏览器要显示的文件名", "UTF-8"); response.setCh
阅读全文
摘要:jar:itext-4.2.1.jar 在很多公文的落款处都需要绝对定位,所以记录此代码如下: PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("test.pdf")); PdfContentByte c
阅读全文
摘要:BigDecimal的运算——加减乘除 首先是bigdecimal的初始化 这里对比了两种形式, 第一种直接value写数字的值,第二种用string来表示 BigDecimal num1 = new BigDecimal(0.005); BigDecimal num2 = new BigDecim
阅读全文
摘要:<html> <head> <title>测试页面</title> </head> <body> 学生列表:<br> <table border="1"> <tr> <th>序号</th> <th>学号</th> <th>姓名</th> <th>年龄</th> <th>家庭住址</th> </tr>
阅读全文
摘要:# 是否允许HttpServletRequest属性覆盖(隐藏)控制器生成的同名模型属性。 spring.freemarker.allow-request-override=false # 是否允许HttpSession属性覆盖(隐藏)控制器生成的同名模型属性。 spring.freemarker.
阅读全文
摘要:最近在springboot项目中使用freemarker时,当页面里取某个空值进行判断,会报异常,异常信息全显示在页面上。通过一个配置,就可以全局解决了在application.properties的freemarker属性配置中加入: spring.freemarker.settings.clas
阅读全文
摘要:import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; import java.io.UnsupportedEncodingException; import java.util.Base64; public class Base6
阅读全文
摘要:public void testBigDecimal() { BigDecimal decimal = BigDecimal.ZERO; String x = "5"; for (int i = 0; i < 3; i++) { decimal.add(new BigDecimal(x)); } S
阅读全文
摘要:import java.util.Calendar; public class Date6 { public static void main(String[] args) { Calendar c = Calendar.getInstance(); int month=c.get(c.WEEK_O
阅读全文
摘要:选中module的pom.xml,右键,选择" add as maven project",idea会识别该pom的项目
阅读全文
摘要:1. 在项目工程中新建lib 2. 通过maven命令完成jar安装 mvn install:install-file -Dfile=F:\demo\lib\taobao-sdk-java-1.0.jar # jar包的实际路径 -DgroupId=com.mydefine # pom 文件中填写的
阅读全文
摘要:import tk.mybatis.mapper.entity.Example; import com.github.pagehelper.PageHelper; ... @Override public List<Repayxxx> listRepaymentPlan(Integer start)
阅读全文
摘要:java.lang.Iterable java.util.Iterator 来自百度知道: Iterator是迭代器类,而Iterable是接口。 好多类都实现了Iterable接口,这样对象就可以调用iterator()方法。 一般都是结合着用,比如 HashMap类就实现了Iterable接口,
阅读全文
摘要:@AssertFalse 验证注解的元素值是 false @AssertTrue 验证注解的元素值是 true @DecimalMax(value=x) 验证注解的元素值小于等于指定的十进制value 值 @DecimalMin(value=x) 验证注解的元素值大于等于指定的十进制value 值
阅读全文
摘要:警告如图所示,该警告是因为jdk版本太高(我用的是15.0,据说9.0的也会这样),具体的原理还没有研究,它不影响项目的正常运行,但是看着很糟心有木有~~~~ 解决方案是把项目jdk降低到1.8及以下,建议1.8。
阅读全文
摘要:查看某个数据下的表及其备注: select table_name,table_comment from information_schema.tables where table_schema='db' ; 只要改后面的table_schema为你的数据库名 结果: 查看某个表下的字段及其备注 de
阅读全文