加载中
spring注入bean指定别名

在实际业务场景可能会需要同一个类型的bean要注入多个,那就需要指定一个别名

2017/08/07 15:57
7.2K
4位数吸血鬼数字算法

java编程思想(第四版) 第四章的练习10. 自己做的,如果还有可优化的地方请多指教 /**    * 吸血鬼数字是指位数为偶数的数字,由一对数字相乘而得到    * 且这对数字各包含一半位数的数字.排序不限...

2017/07/02 01:01
425
jackson not marked as ignorable异常

在前台传递JSON串到后台.由后台将JSON转成实体类对象时,出现一下异常信息 Unrecognized field "pager.pageSize" (Class xxxxx.AlxxxxxBean), not marked as ignorable 原因是因为前台传递的J...

2017/05/19 19:47
1.3W
Tomcat部署时没有项目

Tomcat在myeclipse中部署的时候却没有自己要部署的那个项目,点开project也没有. 解决办法,找到tomcat下面的webapp看下项目是否已经存在了.如果存在就删除.重启myeclipse就可以了...

2017/05/18 19:05
382
java启动redis服务

package test1; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import org.apache.commons.lang.StringUtils; import sms.JedisPoolDe...

2017/05/17 16:00
1K
一个基于servlet 3.0的不使用web.xml配置文件的建议web项目demo

项目jar包: package spittr.config; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan.Filter; import org.s...

2017/05/10 22:13
1.3K
Spring 中 Bean 的作用域

在默认情况下,Spring 应用上下文中所有的 bean 都是以单例的形式存在的. 也就是说不管给定的一个 bean 被注入到其它 bean多少次,每次注入的都是同一个实例. 在大多数情况下,单例 bean 是很理...

2017/05/07 17:05
115
MyBatis注解模式批量insert方法

方法一:script标签方式   @Insert("<script>insert into xxx (channelId,siteId) " +       "values " +       "<foreach collection=\"list\" item=\"item\" index=\"index\" separator=\",\" >(#...

2017/04/19 16:58
1.7K
MyBatis注解模式批量插入异常

项目中批量insert插入的时候虽然数据全部插入成功了,但是抛出了一个异常 以下是异常信息: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.Exe...

2017/04/19 16:47
1W
MyBatis注解模式取参数方法

@Select("select count(*) from (select id from patrol_host where hostName=#{hostName} ) tmp_count") public int isAAA(String hostName);    @Select("select count(*) from (select id ...

2017/04/18 17:26
1.2K
整合log4j和mybatis,输出最终生成的SQL

Mybatis内置的日志工厂提供日志功能,具体的日志实现有以下几种工具: SLF4J Apache Commons Logging Log4j 2 Log4j JDK logging 具体选择哪个日志实现工具由MyBatis的内置日志工厂确定。它会...

2017/04/18 15:02
359
Integer缓存机制

Integer a = 127; Integer b = 127; System.out.println(a == b);// true Integer c = 128; Integer d = 128; System.out.println(c == d);// false Integer e = 127; Integer f = new Int...

2017/04/03 18:14
76

没有更多内容

加载失败,请刷新页面

返回顶部
顶部