只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2018-12-04 19:06 YouAreABug 阅读(17) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-01-03 09:47 YouAreABug 阅读(7) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-12-30 23:55 YouAreABug 阅读(2) 评论(0) 推荐(0) 编辑
摘要: /*Redis*/ @Bean public RedisConnectionFactory redisConnectionFactory() { return new JedisConnectionFactory(); } /*redis模板*/ /* @Bean public RedisTemplate redisTe... 阅读全文
posted @ 2018-12-28 21:20 YouAreABug 阅读(247) 评论(0) 推荐(0) 编辑
摘要: /*以下的方法都可以使用*/ public List select() { try { Jedis jedis = new Jedis(); String key = "newss"; //jackson内置的对象有序列化和反序列化的方法 ObjectMapper ob... 阅读全文
posted @ 2018-12-28 21:18 YouAreABug 阅读(221) 评论(0) 推荐(0) 编辑
摘要: //相当于sqlSessionFactoryBean这个类的配置 @Bean(name = "entityManagerFactory") public LocalContainerEntityManagerFactoryBean localContainerEntityManagerFactoryBean(DataSource dataSource) { Loc... 阅读全文
posted @ 2018-12-27 15:10 YouAreABug 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 启动两个Resdis实例 首先如果我们开了,redis-cli我们先关闭,然后开启三个cmd命令窗口; 第一步: 第二步: 第三步: 这样就可以启动连个redis服务了,试试看 阅读全文
posted @ 2018-12-24 22:30 YouAreABug 阅读(1919) 评论(0) 推荐(0) 编辑
摘要: 子容器的配置:创建SpringMVCConfig类 父容器的配置:创建RootConfig、SpringDAOConfig、SpringServiceConfig web.xml: 改为定义了一个WebConfig SpringMVCConfig: SpringDAOConfig: SpringSe 阅读全文
posted @ 2018-12-20 22:10 YouAreABug 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1、如果对一个对象的方法进行扩充(不改变源码的情况之下,增加或修改行为)的话,一般使用代理模式: 2、如果直接写代理生成也麻烦了,所以,基于动态代理,产生了 AOP 的编程思想。这里的*扩充*指的是功能分离,实现解耦 3、实际中,基于代理实现的 AOP 方案有很多,比如: 4、Spring AOP 阅读全文
posted @ 2018-12-18 20:09 YouAreABug 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 6 阅读全文
posted @ 2018-12-15 22:51 YouAreABug 阅读(250) 评论(0) 推荐(0) 编辑
摘要: ## 一、Spring 常用的注解 @Bean @Import @ImportResource @Configuration @ComponentScan @Component @Controller @Service @Reposi... 阅读全文
posted @ 2018-12-14 23:26 YouAreABug 阅读(166) 评论(0) 推荐(0) 编辑