对typesafe enum模式的改进
按照一些资料上讲,其实enum也就是在编译器层面实现用类来包装枚举(typesafe enum 模式)的思想。以保证类型安全。自己用类来写枚举其实效果也还是不错的,只是代码略显啰嗦。例子代码 public class EnumClass1 extends EnumClass { private En...
com.typesafe.config加载任意位置的配置文件
typesafe下的config包可以用来读取配置文件,支持多种形式。 参考:https://github.com/typesafehub/config 但是,若使用 ConfigFactory.load()加载配置文件,只能加载src/main/resources目录下的application....
【Bug历练手册】Scala PlayFramework com.typesafe.play#sbt-plugin Not Fount
创建Playframework项目时 出现这个问题的时候,以为jar包导入问题,从sbt plugin repository下载了对应的jar包装载到sbt本地库。发现又出现加载其他Jar包出问题。 定位到问题 repository有问题,参考stack 配置plugin.sbt如下 resolve...
TypeSafe Scala IDE (Eclipse)没有显示任何Scala项目。
I'm running Mac Os 10.5.8, with java sdk 1.5.0_30. I've downloaded and installed the sbt package, and have verified that it is running properly. Final...
Effective Java 29 Consider typesafe heterogeneous containers
When a class literal is passed among methods to communicate both compile-time and runtime type information.Map<Class<T>, Object>Class's ca...
未解决的依赖项:com.typesafe.play#play-slick_2.10;0.6.0.1:未找到。
I am getting unresolved dependencies errors when trying to use slick or play-slick with Play Framework 2.2.2, sbt 0.13.0 and Scala 2.10.3 on Mac OS X ...
为什么构建Spark源代码会给出“对象sbt不是package com.typesafe的成员”?
I tried to compile the https://github.com/apache/spark project using IntelliJ IDEA with the sbt plugin on Windows. 我尝试使用Windows上的sbt插件IntelliJ IDEA来编译...
报错:Exception in thread "main" com.typesafe.config.ConfigException$UnresolvedSubstitution
报错现象: 报错原因: pom文件中的jar包太高,可以降低jar包的版本号。 报错解决: 我将2.11换成了2.10,即可解决。 <dependency> <groupId>org.apache.flink</groupId> ...
运行sbt导致“com.typesafe.sbteclipse#sbteclipse;1.4.0:未找到”
I'm running Windows 7 x64 cygwin. 我正在运行Windows 7 x64 cygwin。 I just installed the latest sbt for Martin Odersky's Coursera Scala class after a previo...
配置管理库 typesafe.config
Typesafe的Config库,纯Java写成、零外部依赖、代码精简、功能灵活、API友好。支持Java properties、JSON、JSON超集格式HOCON以及环境变量。它也是Akka的配置管理库。特性: 纯java实现,无任何依赖 充分的测试 支持: Java properti...
报错:Exception in thread "main" com.typesafe.config.ConfigException$UnresolvedSubstitution
报错现象:报错原因:pom文件中的jar包太高,可以降低jar包的版本号。报错解决:我将2.11换成了2.10,即可解决。 <dependency> <groupId>org.apache.flink</groupId> ...
访问TypeSafe配置中的数组元素
Given a nested JSON as configuration, like: 给定嵌套的JSON作为配置,如: { app: { id: "app1" instances: 2, servers: [ { host: "...