
spring
mxlwd168
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
声明一个简单的bean
spring依赖的maven dependency http://mvnrepository.com/artifact/org.springframework 在pom.xml中添加如下依赖: http://mvnrepository.com/artifact/org.springframework/spring-context --> dependency> grou转载 2017-07-02 11:37:20 · 305 阅读 · 0 评论 -
bean装配样式大全
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://http://www.springframework.org/schema/util" xsi:schemaLocation原创 2017-07-04 10:54:54 · 219 阅读 · 0 评论 -
spring 注解使用
1 autowired @Autowired(required=false) //允许null @Qualifier("name1") @Strummed private Object value; 2 inject @Inject //不允许null @Named("name1")//标记id private Object value2;原创 2017-07-04 14:39:33 · 212 阅读 · 0 评论 -
用spring的beans配置mysql数据库
http://lsn-1212.iteye.com/blog/1441622 先说下准备工作,需要下个spring包有:spring-framework-3.1.1.RELEASE-with-docs.zip mysql数据库的驱动包:mysql-connector-java-5.1.18.zip 用mvc模式写本项目: 配置beans.xml转载 2017-07-14 20:44:57 · 652 阅读 · 0 评论 -
spring+dao+jdbctemplate+datasource配置开发样例
http://blog.youkuaiyun.com/Trigl/article/details/50934675?locationNum=1&fps=1 1 配置数据源 Spring并没有提供数据源连接池实现,但是apache的DBCP是一个不错 选择,DBCP包含了多个提供连接池功能的数据源,其中BasicDataSource是最常使用的,在XML中的配置如下: b转载 2017-07-16 10:35:38 · 529 阅读 · 0 评论 -
aop代码大全
execution(* com.xyz.service.AccountService.*(..)) execution(* com.xyz.service.AccountService.*(..)and within(com.xyz.service.service2.*) and bean(id)) execution(* com.xyz.ser原创 2017-07-05 21:39:32 · 495 阅读 · 0 评论 -
Spring中配置使用Redis
spring配置文件(applicationContext.xml): [html] view plain copy print? xml version="1.0" encoding="UTF-8"?> beans xmlns="http://www.springframework.org/schema/beans" xml转载 2017-07-14 21:13:20 · 402 阅读 · 0 评论 -
java 下载文件功能实现
@RequestMapping("downloadFile") public ResponseEntity downloadFile(String patchId, HttpServletResponse response) throws IOException { String path = "files/" + patchId;原创 2017-07-24 19:20:45 · 420 阅读 · 0 评论 -
Cannot open Redis connection due invalid URI
转自 http://blog.youkuaiyun.com/running_snail_/article/details/51679538 InvalidURIException: Cannot open Redis connection due invalid URI 自己在windows下开发,连的redis没有任何问题,部署到Linux机器上就开始提示Cannot open Re转载 2017-07-26 11:39:37 · 2614 阅读 · 0 评论