1、组间面板选择Subreport插入模板组件2、定义要传参的Parameters变量这里我们定义两个变量,分别用来传递List参数和单个参数paramsList 属性parameter class选择java.util.Listlist里面我们定义几个属性 name age sex等money 属性parameter class选择java.lang.String3、模板组件属性设置Subrep
报错堆栈: org.apache.shiro.authz.UnauthenticatedException: This subject is anonymous - it does not have any identifying principals and authorization operations require an identity to check against. A Sub
在对一个集合实时遍历处理,修改或删除,会触发ConcurrentModificationException异常 单线程情况: (1)使用Iterator提供的remove方法,用于删除当前元素。 (2)建立一个集合,记录需要删除的元素,之后统一删除。 (3)不使用Iterator进行遍历,需要之一的是自己保证索引正常。 (4)使用并发集合类来避免ConcurrentModificationExce
@Profile:指定组件在哪个环境的情况下才能被注册到容器中,不指定,任何环境下都能注册这个组件 加了环境标识的bean,只有这个环境被激活的时候才能注册到Spring容器中。 加了环境标识的类或接口,只有这个环境被激活的时候才能注册到Spring容器中。 使用: @FeignClient(name = "policyAuth", url = "${auth.url}") @Service @P
int a = 1; if ((a == 1)) { System.out.println("a======1"); } else if (a == 1) { System.out.println("a=======1.1"); } else if (a == 1) { System.out.println("a=======1.2"); } // 打印:a====
异常堆栈:org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location [/tmp/tomcat.44869801002835
1、通过离线导包的形式处理1.1、直接copy同事本地maven仓库做覆盖。1.2、设置Eclipse或IDEA中Maven的策略为workoffine2、通过修改maven配置setting.xml的更新策略updatePolicy含义: always:每次,never:从不,daily:每天<profile> <id>myrepo</id>
文件下载异常:Causedby:java.io.IOException:Connectionresetbypeer信息:所在IP:192.168.5.92所在系统:null接口[/api/v2/flexible-insure/grp/downloadFileForGrp]出现异常,方法:controller.FcGrpDoController$$EnhancerBySpringCGLIB$$d4a
跨域可以在前端通过JSONP来解决,但是JSONP只可以发送GET请求,无法发送其他类型的请求,在RESTful风格的应用中,就显得非常鸡肋,因此我们推荐在后端通过(CORS,Cross-originresourcesharing)来解决跨域问题。https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Access_control_CORS1、通过实现W
我们在日常开发中封装对象时,会对一些特殊属性字段默认值;使用new构造器初始化时默认值可以被封装,在使用Lombok的Builder初始化的对象属性失效。@Data@Builder@AllArgsConstructor@NoArgsConstructorpublicclassFaceReq1{@JsonProperty("trans_no")privateStringtransNo;private
importjava.util.Base64;publicclassTest{publicstaticvoidmain(String[]args)throwsUnsupportedEncodingException{//要加密的字符串Stringpwd="12345678";//加密StringencodeToString=Base64.getEncoder().encodeToString(pw
javax.validation.Valid;1、使用在Controller上使用@Valid注解publicStringpayment(@RequestBody@ValidPrivatePayReqreq){};二级嵌套对象校验不作用问题在二级对象上使用@Valid注解publicclassPrivatePayReq{@Valid@NotNull(message="退费对象不可为空")priva
@ResourceJDK默认提供的注解,javax.annotation属于JSR-250规范的一部分,Spring通过CommonAnnotationBeanPostProcessor来处理该注解,在实现依赖注入的时候的匹配顺序是:基于名称基于类型基于@Qualifier@Injectjavax.inject属于JSR-330提供的注解,需要javax.inject依赖支持<depende
使用org.mybatis.generator反向生成mapper、mapper.xml、do、doExample文件,配置文件generatorConfig.xml报如下错误:Thecontentofelementtypemustmatch"property*,plugin*,commentGenerator?,jdbcConnection,javaTypeResolver?,javaModel
见页面
构造方法作用就是对类进行初始化。如果你没有定议任何构造方法的形式,程式会为你取一个不带任何参数的构造函数,那么你产生类的对像时只能用不带参数的方法,如:classa{}//没有任何构造函数。构造方法就是与类同名的那个方法,它的作用是可以用来初始化,例子如下classPerson//人类{publicPerson(Stringn,inta)//构造方法{name=n;age=a;}privatest
1、Pom.xml文件依赖<?xmlversion="1.0"encoding="UTF-8"?><projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-×××tance"xsi:schemaLocation="http://maven.apache.
publicstaticvoidmain(String[]args){List<Double>doubles=Arrays.asList(newDouble(3.3),newDouble(3.3),newDouble(3.3));doublesum=doubles.stream().mapToDouble(Double::doubleValue).sum();System.out.pr
1、错误用法:intarr[]={1,2,3};List<int[]>ints=Arrays.asList(arr);System.out.println(ints.size());//1通过Arrays.asList方法转换的List并不是真正的java.util.ArrayList!!!返回的是java.util.Arrays.ArrayList!!!2、不同之处Arrays.Ar
原由:在使用SpringDataJPA语句进行对数据库表的某个字段的空值查询时,如:findByIdAndNameIsNullfindByIdAndNameIsNotNull当name这个字段值为''空串时,查询出来的结果差异很大1、建表CREATETABLE`user`(`id`bigint(11)NOTNULLAUTO_INCREMENT,`name`varchar(45)CH
先看一段代码示例:System.out.println(newBigDecimal(0.99));System.out.println(newBigDecimal("0.99"));System.out.println(BigDecimal.valueOf(0.99));System.out.println(newBigDecimal(Double.valueOf(0.99)));System.o
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号