场景 假如有以下属性文件dev.properties, 需要注入下面的tag tag=123 通过PropertyPlaceholderConfigurer 代码 通过PreferencesPlaceholderConfigurer 代码: 通过PropertiesFactoryBean 代码: 通 Read More
posted @ 2017-08-17 15:35 Ysoo Views(19870) Comments(0) Diggs(0) Edit
1、先在项目中创建一个包(如:config),再创建一个配置文件(如:a.properties),添加配置信息如下:比如 2.代码: Read More
posted @ 2017-08-17 15:27 Ysoo Views(999) Comments(0) Diggs(0) Edit
posted @ 2017-08-10 16:16 Ysoo Views(445) Comments(0) Diggs(0) Edit
Spring整合Hibernate整合的是什么: 1.由Spring的IOC容器管理Hibernate的SessionFactory 2.使Hibernate使用上Spring的声明式事物 整合步骤: 1)加入hibernate 1>加入jar包 2>加入hibernate的配置文件 hiberna Read More
posted @ 2017-08-03 17:20 Ysoo Views(138) Comments(0) Diggs(0) Edit
很多时候会在url上拼接参数,通过request可以获取,下面是解析的笔记。 Read More
posted @ 2017-07-12 09:25 Ysoo Views(248) Comments(0) Diggs(0) Edit
经常会用到编号的生成,这边整理一下: 先看controller方法: 再看service,sql语句写在service中: Read More
posted @ 2017-07-05 16:03 Ysoo Views(5140) Comments(0) Diggs(0) Edit
一、因为直接使用了SpringMVC,所以之前一直不明白xxx-servlet.xml和applicationContext.xml是如何区别的,其实如果直接使用SpringMVC是可以不添加applicationContext.xml文件的。使用applicationContext.xml文件时是 Read More
posted @ 2017-03-31 15:48 Ysoo Views(154) Comments(0) Diggs(0) Edit
原文链接:http://blog.sina.com.cn/s/blog_534f69a001011lkj.html1.WebApplicationContext的研究 ApplicationContext是spring的核心,Context通常解释为上下文环境,用“容器”来表述更容易理解一些,ApplicationContext则是“应用的容器了”了。 spring把bea... Read More
posted @ 2017-02-09 10:41 Ysoo Views(1939) Comments(0) Diggs(0) Edit
一、概念 协议是指计算机通信网络中两台计算机之间进行通信所必须共同遵守的规定或规则,超文本传输协议(HTTP)是一种通信协议,它允许将超文本标记语言(HTML)文档从Web服务器传送到客户端的浏览器。 HTTP协议,即超文本传输协议(Hypertext transfer protocol)。是一种详细规定了浏览器和万维网(WWW = World Wide Web)服务器之间互相通信的规则,通... Read More
posted @ 2017-02-04 10:17 Ysoo Views(250) Comments(0) Diggs(0) Edit
表单验证 avalon内置了强大的表单验证功能,它需要结合ms-duplex, ms-validate, ms-rules这个三个指令一起使用。 ms-duplex负责监控每个表单元素的输入。 ms-rules负责对表单元素的值进行各种检测,包括非空验证,长度验测,格式匹配等等。 ms-valida Read More
posted @ 2016-11-16 11:02 Ysoo Views(3217) Comments(0) Diggs(0) Edit