摘要:
前言 github: https://github.com/vergilyn/SpringBootDemo 代码位置: 参考: Spring Boot Reference Guide , §77.2 Configure Two DataSources springboot + mybatis + 多数据源 springboot + mybatis + ... 阅读全文
摘要:
前言 github: https://github.com/vergilyn/SpringBootDemo 一、AOP 官方demo:https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-aop 1.1 pom依赖 org.springfra... 阅读全文
摘要:
前言 github: https://github.com/vergilyn/SpringBootDemo 代码位置: 一、准备 spring boot对jersey1.x与jersey2.x的注入方式有区别。本文是针对2.x的配置(服务端,不包含客户端调用。) 需要依赖的POMs org.springframework.boot spring-boot-starter... 阅读全文
摘要:
前言 github: https://github.com/vergilyn/SpringBootDemo 代码位置: 一、Spring Boot集成JdbcTemplate或NamedParameterJdbcTemplate spring boot中JdbcTemplate与NamedParameterJdbcTemplate都是被自动配置的,所以只要注入就可用。(在传统的spr... 阅读全文
摘要:
前言 github: https://github.com/vergilyn/SpringBootDemo 说明:我代码的结构是用profile来区分/激活要加载的配置,从而在一个project中写各种spring boot的demo。所以很多时候可能在*Application.class中指定了特殊的profile。 这种方式可能很糟糕(在细看理解application.prop... 阅读全文
摘要:
前言 github: https://github.com/vergilyn/SpringBootDemo 代码位置:(注意测试方法在,test下的SpelValueApplicationTest.class) 一、什么是SpEL SpEL:spring表达式语言,Spring Expression Language。从spring3开始引入。 可以通过xml或注解的施行... 阅读全文
摘要:
前言 算是对《SpringBoot初学(2) - properties配置和读取》的总结吧。 概念性总结 一、Spring Boot允许外化(externalize)你的配置。可以使用properties文件,YAML文件,环境变量和命令行参数来外化配置。 使用@Value注解,可以直接将属性值注入到你的beans中,并通过Spring的Environment抽象或绑定到结构化对象... 阅读全文
摘要:
前言 参考oracle官方文档:PL/SQL Language Reference 11g Release 2 - 5 PL/SQL Collections and Records 可以去看下文档中写的 - 各个集合的适用场景:Appropriate Uses for Associative Arr 阅读全文