bean的scope属性有prototype,singleton,request, session几个属性 spring和struts2整合的时候,struts2的action要配置成scope="prototype",这是为了线程安全, 下面是struts2+hibernate+spring配置文 ...
分类:
编程语言 时间:
2017-12-14 21:04:20
阅读次数:
258
17:57:19: Executing task 'bootRun'... Parallel execution with configuration on demand is an incubating feature.:thinkvenus-common:compileJava:thinkven ...
分类:
编程语言 时间:
2017-12-12 21:11:14
阅读次数:
13093
在使用模糊查询sql时,如果使用${}进行字符拼接,无法防止sql诸如问题,如果使用concat函数则只对mysql有效果,用Oracle则需要用连接符||,这样在数据库变的时候需要修改,不利于移植。mybatis提供元素<bind>很好能解决这个问题。 项目结构: 废话不说,使用maven管理ja ...
分类:
其他好文 时间:
2017-12-12 17:39:57
阅读次数:
264
不需要添加额外的依赖 在WebMvcConfig.java中添加代码 /** * bean验证 * @return */ @Bean public LocalValidatorFactoryBean validator() { LocalValidatorFactoryBean validator ...
分类:
编程语言 时间:
2017-12-12 10:29:58
阅读次数:
168
Replacing Threads with Dispatch Queues To understand how you might replace threads with dispatch queues, first consider some of the ways you might be ...
分类:
其他好文 时间:
2017-12-11 19:59:51
阅读次数:
266
phpexcel对于中文的文件名无法读取(我本地环境都是utf-8的编码) 是不是win系统识别都是gbk ?(需要把utf-8的字符串改为gbk) 我这样可以正常输出... 我看有些把字符编码反过来如: 这个可能要看你当前的系统环境了.. 参考:https://www.cnblogs.com/ye ...
分类:
Web程序 时间:
2017-12-10 13:04:39
阅读次数:
239
循环1.7744 问题 中的floor()函数 表示向下取整。 Floor(0.5) == 0 , Floor(-1.1) == -2 | floor(x+0.5) 表示对x四舍五入 (变为整数)| 因为 1 intmain(void) { constintMOD=1000000; inti,j,n... ...
分类:
编程语言 时间:
2017-12-09 16:58:36
阅读次数:
139
Android 使用Retrofit2.0+OkHttp3.0实现缓存处理+Cookie持久化第三方库 ...
分类:
移动开发 时间:
2017-12-09 16:56:22
阅读次数:
353
*图片初始化public class FrescoClass extends Application{ @Override public void onCreate() { super.onCreate(); Fresco.initialize(this); }}*主页面 public class ...
分类:
编程语言 时间:
2017-12-06 10:31:35
阅读次数:
250
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
分类:
移动开发 时间:
2017-12-05 13:33:03
阅读次数:
156