Month: September 2019

sbt new templatesbt new template

https://www.scala-sbt.org/0.13/docs/sbt-new-and-Templates.html sbt new scala/scala-seed.g8 Giter8 support  Giter8 is a templating project originally started by Nathan Hamblen in 2010, and now maintained by the foundweekends project. The unique aspect of Giter8

The difference among Nil,Null,None,Nothing in scalaThe difference among Nil,Null,None,Nothing in scala

Nothing Nothing是所有类型的子类,它没有对象,但是可以定义类型,如果一个类型抛出异常,那这个返回值类型就是Nothing Null Null是AnyRef的子类(引用类型) null是Null唯一的对象 None None是Option的一个子类,一个Some集合,一个None,如果Option中没有值,则返回None Nil Nil是一个空List,定义为List[Nothing],所有Nil是所有List[T]的子类

log4j configlog4j config

### 设置### log4j.rootLogger = debug,stdout,D,E ### 输出信息到控制抬 ### log4j.appender.stdout = org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target = System.out log4j.appender.stdout.layout = org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n ### 输出DEBUG 级别以上的日志到=E://logs/error.log ### log4j.appender.D = org.apache.log4j.DailyRollingFileAppender

play tutorialplay tutorial

sbt new playframework/play-java-seed.g8 sbt new playframework/play-scala-seed.g8 After that, use sbt run and then go to http://localhost:9000 to see the running server. Type g8Scaffold form from sbt to create the scaffold

docker-compose start Redis with passworddocker-compose start Redis with password

方案一 在 docker-compose.yml 文件中写入下列内容: redis: image: redis container_name: my_redis command: redis-server /usr/local/etc/redis/redis.conf ports: - "6379:6379" volumes: - ./data:/data - ./redis.conf:/usr/local/etc/redis/redis.conf 其中: image 代表镜像名称; container_name 代表生成的容器名称; command 代表生成容器后要执行的命令; ports 将容器内的端口映射到容器外; volumes