# Stock Capital IO

## 环境篇 (4)

### IDE 环境配置

- 安装 IDEA IU

>  v2017.3 or latter

    # 官网
    http://www.jetbrains.com/idea/
    # 当前最新版本号为2018.2

> 激活

    # 选择 licence server 激活方式，选择一下可用的licence server激活。
    http://idea.toocruel.net
    http://idea.java.sx/
    http://intellij.mandroid.cn/
    http://idea.imsxm.com/
    http://idea.iteblog.com/key.php

- 配置

> 配置编码

    # Preferences > Editor > File encodings >
    # 设置默认编码 UTF-8
    > Global Encoding
    > Project Encoding
    > Default encoding for properties files
    > Transparent native-to-ascii conversion 勾选：默认转换Properties文件ASCII编码

> 配置编辑器

    # Preferences > Editor > General > Appearance
    > show line numbers
    > show method separators
    > show whitespaces

> 配置Javascript 语法版本（前台开发VUE中采用ES6语法）

    # Preferences > Languages & Frameworks > JavaScript > JavaScript language version 选择ECMAScript 6（ES6）

> 配置 Serializable class without 'serializable' 警告

    # Preferences > Editor > Inspections > 勾选 Serializable class without 'serializable'

> 配置默认注释

    1 Preferences > Editor > File and Code Templates > Class
    2 Preferences > Editor > File and Code Templates > Interface
    3 Preferences > Editor > File and Code Templates > Enum
    4 Preferences > Editor > File and Code Templates > AnnotationType

      /**
       * ${NAME}.
       *
       * @author ${USER}.
       * @version 0.0.1.
       *
       * @serial ${DATE} : base version.
       */

- 插件安装

>
    # Preferences > Plugin > 搜索 插件 > search in repostories > 安装重启

> CodeStyle-IDEA

> google-java-format

> Vue.js

> Mongo Plugin

> Iedis

- 插件配置

> 配置code style [idea-code-style配置文件](http://localhost:7000/static/guide/io/env/idea-code-style-20180109.xml)

    1 下载idea-code-style.xml 保存到本地（点击连接，保存）
    2 Preferences > Editor > Code Style > Schema > Import schema > 选择idea-code-style.xml
    3 Preferences > Other Setting > Checkstyle > Configuration file > 选择 Google checks
    4 Preferences > Other Setting > google-java-format settings > enable google-java-format

> Iedis 激活 [iedis破解包](http://localhost:7000/static/guide/io/env/iedis-2.41.jar)

    1 下载iedis破解包 保存到本地
    2 替换iedis.jar
    # Windows
    ${USER_HOME}/.IntelliJIdea2018.2/Iedis/lib
    # Mac
    /Users/codepasser/Library/Application Support/IntelliJIdea2018.2/Iedis/lib
