自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 解决JPA使用root.fetch时报the owner of the fetched association was not present in the select list 问题

在使用JPASpecification 进行多条件查询时,使用root.fetch("xx")关联查询LAZY的属性时,会报如下错误:org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the sele...

2020-03-02 15:04:44 1542

原创 keyup() 限制文本框只输入数字并且不能以0开头

有时页面需要限制输入框只能输入数字并且不能以0开头,可以通过以下方式实现onkeyup="value=value.replace(/[^\d]/g, '').replace(/^0/g,'')"如果允许0开头,则可以不用写上第二个replace...

2018-05-23 11:05:59 4392

原创 ireport中如何将特定内容放到最后一页显示

    因为项目需要,部分数据只需要在最后一页显示,比如统计结果等,本来最简单的方式应该是在“Print When Expression”写上控制条件,然而在网上找了半天也没有找到解决方法,只能自己用点小技巧了,方法如下:      由于page footer和last page footer 是不能同一页同时显示的,因此可以把要最后一页显示的内容放到last page footer里,其他的跟p...

2018-02-11 10:51:04 4791 2

原创 使用POI导出xls和xlsx格式要注意的问题

导出xlsx格式:  response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); response.addHeader("Content-Disposition", "attachment;filename=fileName" + ".xlsx");创建...

2016-08-30 11:15:17 50988 21

原创 给ireport的报表添加序号

在做ireport时,有时需要让报表在前面给我们自动排号,可以利用ireport本身提供的变量来实现如上图,拖动这个变量,放到你要的位置,比如右键,选择 Edit expression,按以下选择Apply,这样生成的报表就会自动产生序号了

2016-08-11 11:18:24 6061

原创 Error configuring application listener of class org.springframework.web.context.ContextLoaderListene

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at o

2016-04-14 11:24:27 421

原创 Hibernate 的三种查询方式:HQL、Criteria、Sql

第一种方式:HQL(Hibernate Query Languge,Hibernate 查询语言)查询是一种面向对象的查询语言,其中没有表和字段的概念,只有类、对象和属性的概念,HQL 是应用较为广泛的方式语法:[select/update/delete……] from Entity [where……] [group by……] [having……] [order by

2016-04-10 21:56:35 454

原创 统计互不相同且无重复数字的三位数个数

public class Eight { public static void main(String[] args) { int n=0; int count = 0; for(int i=1;i<5;i++) { //i是百位数 for(int j=1;j<5;j++) { //j是十位数 if(i == j) continue; //如果i==j,跳

2016-01-10 13:22:45 834

原创 判断 n 以内的完全数有多少个!

package Test1;//如果一个数恰好等于它的因子之和,则称该数为“完全数”。import java.util.Scanner;public class Seven { public static void main(String[] args) { // TODO Auto-generated method stub int a = 10000; compN

2016-01-10 12:50:43 1210

原创 Java 统计字符串里英文字母、空格、数字和其它字符的个数

import java.util.Scanner;//输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数。public class Six {public static void main(String[] args) {Scanner input = new Scanner(System.in);System.out.println("输入一行字

2016-01-09 16:34:14 5296

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除