上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 121 下一页
摘要: 我在整合mybatis和spring的时候,测试数据库连接时报了标题所示错误,我的数据库连接配置如下: driver=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEnco 阅读全文
posted @ 2020-05-08 16:42 与f 阅读(428) 评论(0) 推荐(0)
摘要: 以下为spring mvc 3.1中annotation-driven所支持的全部配置 <mvc:annotation-driven message-codes-resolver ="bean ref" validator="" conversion-service=""> <mvc:return- 阅读全文
posted @ 2020-05-07 16:29 与f 阅读(243) 评论(0) 推荐(0)
摘要: 对于SpringMVC的探索已经接近尾声,本篇笔记主要记录下SpringMVC为我们提供的一个神奇标签 <mvc:annotation-driven/>,这个标签会帮我们注入很多关键而实用的bean,但是用它也得小心跟自己手动注入的bean重复,会造成不必要的麻烦。所以今天来了解下这个标签。 本篇笔 阅读全文
posted @ 2020-05-07 16:20 与f 阅读(436) 评论(0) 推荐(0)
摘要: 当我们需要使用BeanPostProcessor时,直接在Spring配置文件中定义这些Bean显得比较笨拙,例如: 使用@Autowired注解,必须事先在Spring容器中声明AutowiredAnnotationBeanPostProcessor的Bean: <bean class="org. 阅读全文
posted @ 2020-05-07 15:15 与f 阅读(215) 评论(0) 推荐(0)
摘要: 优雅REST风格的资源URL不希望带 .html 或 .do 等后缀.由于早期的Spring MVC不能很好地处理静态资源,所以在web.xml中配置DispatcherServlet的请求映射,往往使用 *.do 、 *.xhtml等方式。这就决定了请求URL必须是一个带后缀的URL,而无法采用真 阅读全文
posted @ 2020-05-07 15:08 与f 阅读(990) 评论(0) 推荐(0)
摘要: context-param 为上下文初始化参数 解析:每个<context-param>元素含有一对参数名和参数值(param-name和param-value),用作应用的Servlet上下文初始化参数, 参数名在整个Web应用中必须是惟一的,在web应用的整个生命周期中上下文初始化参数都存在,任 阅读全文
posted @ 2020-05-07 11:09 与f 阅读(894) 评论(0) 推荐(0)
摘要: Spring中的JDBC为我们省去连接和关闭数据库的代码,我们着重关注对数据库的操作。Spring框架在数据库开发中的应用主要使用的是JDBCTemplate类,该类作为Spring对JDBC支持的核心,提供了所有对数据库操作功能的支持。我们将使用JDBCTemplate类完成对mysql数据库的增 阅读全文
posted @ 2020-05-02 09:26 与f 阅读(1608) 评论(0) 推荐(0)
摘要: In this tutorial, we will extend last Maven + Spring hello world example by adding JDBC support, to use Spring + JDBC to insert a record into a custom 阅读全文
posted @ 2020-05-02 08:55 与f 阅读(320) 评论(0) 推荐(0)
摘要: Spring + JdbcTemplate + JdbcDaoSupport examples In Spring JDBC development, you can use JdbcTemplate and JdbcDaoSupport classes to simplify the overal 阅读全文
posted @ 2020-05-02 08:40 与f 阅读(299) 评论(0) 推荐(0)
摘要: <context:property-placeholder location="属性文件,多个之间逗号分隔" file-encoding="文件编码" ignore-resource-not-found="是否忽略找不到的属性文件" ignore-unresolvable="是否忽略解析不到的属性, 阅读全文
posted @ 2020-04-30 17:21 与f 阅读(2087) 评论(0) 推荐(0)
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 121 下一页