Caching
-
Caching
SpringBoot提供组件spring-boot-starter-cache
,提供缓存能力。关键类,如下:
CacheManager
CacheResolver
CacheManagerCustomizer
ConcurrentMapCacheManager
关键注解,如下:
@EnableCaching
@Cacheable
参考资料
- Cache Abstraction
- CachingConfigurer
- spring-boot-data-geode
- Spring Boot for Apache Geode Reference Guide
Hazelcast
-
Hazelcast
关键类,如下:HazelcastConfigCustomizer
ManagementContext
加载配置信息的顺序,如下:
com.hazelcast.client.config.ClientConfig
spring.hazelcast.config
hazelcast.client.config
hazelcast-client.xml
Java应用的工作路径,或者类路径的根路径。hazelcast-client.yaml
Java应用的工作路径,或者类路径的根路径。
相关的配置参数,样例如下:
spring: hazelcast: config: "classpath:config/my-hazelcast.xml"
参考资料
Quartz Scheduler
-
Quartz Scheduler
SpringBoot提供组件spring-boot-starter-quartz
。
关键类,如下:Scheduler
SchedulerFactoryBean
JobDetail
JobBuilder
Calendar
Trigger
JobStore
关键注解,如下:
@QuartzTransactionManager
参考资料
Sending Email
-
Sending Email
关键类,如下:JavaMailSender
相关的配置参数,样例如下:
spring: mail: properties: "[mail.smtp.connectiontimeout]": 5000 "[mail.smtp.timeout]": 3000 "[mail.smtp.writetimeout]": 5000
参数的说明,可参考MailProperties。
参考资料
Validation
-
Validation
关键类,如下:ValidatorFactory
ValidationConfigurationCustomizer
MessageSource
关键注解,如下:
@Validated
参考资料
- Internationalization
- Hibernate Validator FAQ
- SpringMVC-----JSR303以及拦截器
- Spring MVC JSR-303验证框架之Hibernate-Validator
Calling REST Services
-
Calling REST Services
关键类,如下:RestClient
RestClientSsl
RestTemplate
RestTemplateBuilder
WebClient
WebClientSsl
ClientHttpRequestFactory
HttpMessageConverters
支持如下HTTP Client的实现,如下:
- Apache HttpClient
- Jetty HttpClient
- OkHttp (deprecated)
- Simple JDK client (HttpURLConnection)
参考资料
Web Services
-
Web Services
SpringBoot提供组件spring-boot-starter-webservices
。
关键类,如下:WebServiceTemplateBuilder
WebServiceTemplate
WebServiceMessageSender
相关的配置参数,样例如下:
spring: webservices: wsdl-locations: "classpath:/wsdl"
参考资料
Distributed Transactions With JTA
-
Distributed Transactions With JTA
关键类,如下:
JtaTransactionManager