- 博客(4)
- 资源 (1)
- 收藏
- 关注
原创 spring boot 读取配置文件(application.yml)中的属性值
properties与yml 官方参考:https://docs.spring.io/spring-boot/docs/1.2.3.RELEASE/reference/html/boot-features-external-config.html#boot-features-external-config-yaml 在spring boot中,简单几步,读取配置文件(application.
2017-10-18 15:25:46 617
原创 spring-boot 自定义Executor的配置方法及@Async的使用
简单几步,实现异步新线程调用。 1、在主类中添加@EnableAsync注解: [java] view plain copy @SpringBootApplication @EnableScheduling @EnableAsync public class MySpringBootApplication {
2017-10-18 15:19:27 2051
转载 spring boot应用启动原理分析
spring boot quick start 在spring boot里,很吸引人的一个特性是可以直接把应用打包成为一个jar/war,然后这个jar/war是可以直接启动的,不需要另外配置一个Web Server。 如果之前没有使用过spring boot可以通过下面的demo来感受下。 下面以这个工程为例,演示如何启动Spring boot项目: git clone git
2017-10-18 10:11:42 231
转载 ConcurrentHashMap原理分析
一、背景: 线程不安全的HashMap 因为多线程环境下,使用Hashmap进行put操作会引起死循环,导致CPU利用率接近100%,所以在并发情况下不能使用HashMap。 效率低下的HashTable容器 HashTable容器使用synchronized来保证线程安全,但在线程竞争激烈的情况下HashTable的效率非常低下。因为当一个线程
2017-10-17 10:14:43 231
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人