zoukankan      html  css  js  c++  java
  • jhipster入门

    环境: 阿里云linux

    /////////////////////////////////////////////////////////////////////
    yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel
    yum install npm

    mkdir -p /data/qianbao/
    mkdir /data/qianbao/software /data/qianbao/server /data/qianbao/tool /data/qianbao/temp /data/qianbao/source
    mkdir 21-point
    cd 21-point
    npm install git
    npm install bower -g
    npm install node-sass //{"allow_root": true }

    bower install --allow-root
    git clone https://github.com/mraible/21-points.git
    http://plato.qianbaocard.org/article/63

    tar zxvf apache-maven-3.0.5-bin.tar.gz (例如安装目录为: /home/homer/Apache-maven/apache-maven-3.0.5)

    3, 安装
    1) 编辑 /etc/profile
    sudo vi /etc/profile

    2) 配置
    配置maven安装目录: // 安装目录
    export MAVEN_HOME=/usr/app/apache-maven-3.5.0
    export PATH=${MAVEN_HOME}/bin:${PATH}
    source /etc/profile
    1. 加速你的maven
    在pom.xml 中加入: 
    <repositories><!-- 代码库 --> 
    <repository> 
    <id>maven-ali</id> 
    <url>"="http://maven.aliyun.com/nexus/content/groups/public/; 
    <releases> 
    <enabled>true</enabled> 
    </releases> 
    <snapshots> 
    <enabled>true</enabled> 
    <updatePolicy>always</updatePolicy> 
    <checksumPolicy>fail</checksumPolicy> 
    </snapshots> 
    </repository> 
    </repositories>
    build.gradle中,加入:
    repositories {
    maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
    }
    2. 加速你的npm
    21point下运行: npm config set registry https://registry.npm.taobao.org
    鉴于国内的环境,node-sass实在是太难安装了,可以直接通过淘宝的npm镜像来安装。
    1.安装cnpm(https://npm.taobao.org/)
    npm install -g cnpm --registry=https://registry.npm.taobao.org
    2.在项目文件夹下安装
    npm install
    报错的话运行:
    npm install phantomjs-prebuilt@2.1.12 --ignore-scripts
    cnpm install --save-dev node-sass
    cnpm install --save-dev css-loader
    cnpm install --save-dev postcss-loader
    cnpm install --save-dev sass-loader
    说明:--save-dev自动将node-sass加入到项目文件夹下的package.json中
    出现错误执行:npm rebuild node-sass
    在你的项目目录下运行:yarn install
    Install npm dependencies with the command npm install
    Install bower dependencies with the command bower install
    Run the initial setup using gulp with the command gulp install

    3. 加速你的docker
    sudo mkdir -p /etc/docker
    sudo tee /etc/docker/daemon.json <<-'EOF'
    {
    "registry-mirrors": ["https://ym4b9bn1.mirror.aliyuncs.com"]
    }
    EOF
    sudo systemctl daemon-reload
    sudo systemctl restart docker

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////linux
    fedora :
    sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo 或
    curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - 
    sudo yum install yarn## OR ##sudo dnf install yarn

    # 安装node管理工具
    $ git clone git@github.com:creationix/nvm.git ~/.nvm
    $ source ~/.nvm/nvm.sh
    # 安装
    $ nvm install v0.12.0
    # 显示当前本地安装的所有 Node.js
    $ nvm ls # 显示服务器所有可用的 Node.js
    $ nvm ls-remote
    # 本地可用的 Node.js 中使用 0.12.0
    $ nvm use 0.12.0
    # 设置每次启动默认版本
    $ nvm alias default 0.12.0 

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////linux
    Binary is fine
    21-points@2.0.0 /usr/projects/21-points
    ├─┬ gulp-sass@2.3.2
    │ └─┬ node-sass@3.13.1 
    │ ├── cross-spawn@3.0.1 
    │ ├─┬ gaze@1.1.2 
    │ │ └─┬ globule@1.2.0 
    │ │ └── lodash@4.17.4 
    │ ├─┬ mkdirp@0.5.1 
    │ │ └── minimist@0.0.8 
    │ └─┬ npmlog@4.1.2 
    │ └── gauge@2.7.4 
    └─┬ node-sass@4.5.3 
    ├── lodash.mergewith@4.6.0 
    ├─┬ request@2.81.0 
    │ ├── caseless@0.12.0 
    │ ├── form-data@2.1.4 
    │ ├── har-validator@4.2.1 
    │ ├─┬ http-signature@1.1.1 
    │ │ └── assert-plus@0.2.0 
    │ ├── qs@6.4.0 
    │ ├── tough-cookie@2.3.2 
    │ ├── tunnel-agent@0.6.0 
    │ └── uuid@3.1.0 
    └── stdout-stream@1.4.0 
    ////////////////////////////////////////////////jdl命令//jhipster import-jdl yours.jdl
    DEFAULT_MIN_LENGTH = 1
    DEFAULT_SHORT_LENGTH = 64
    DEFAULT_MEDIUM_LENGTH = 128
    DEFAULT_LONG_LENGTH = 256
    DEFAULT_LARGE_LENGTH = 1024
    DEFAULT_MAX_LENGTH = 4096

    /** 基础:帮助主题 */
    entity HelpTopic(vinci_com_help_topic) {
    id Long required, //主题ID
    name String required maxlength(DEFAULT_SHORT_LENGTH), //主题名称
    platform String required maxlength(20), //适用平台
    parentId Integer max(11) ,/**DEFAULT '1',父ID,1:超级父类**/
    status Integer required max(2), //状态
    createUser String maxlength(DEFAULT_SHORT_LENGTH), //创建用户
    createDate Instant, //创建时间
    lastModifiedUser String maxlength(DEFAULT_SHORT_LENGTH), //最后修改用户
    lastModifiedDate Instant, //最后修改时间
    ordinal Integer required, //排序序号
    }

    /** 基础:帮助项内容 */
    entity HelpItem(vinci_com_help_item) {
    title String required maxlength(DEFAULT_MEDIUM_LENGTH), //标题
    helpTopicId Long required, /**帮助主题外键*/
    content String required maxlength(DEFAULT_LARGE_LENGTH), //内容
    status Integer required max(2), //状态
    createUser String maxlength(DEFAULT_SHORT_LENGTH), //创建用户
    createDate Instant, //创建时间
    lastModifiedUser String maxlength(DEFAULT_SHORT_LENGTH), //最后修改用户
    lastModifiedDate Instant, //最后修改时间
    ordinal Integer required, //排序序号
    }

    relationship OneToMany {
    HelpTopic{helpItems} to HelpItem
    }


    ////////////////////////////////////////////////使用注意事项///////////////////
    1, 生成oneToMany时,需要
    把liquibase中的外键删除掉,并把对应domain里的manyToOne端不需要的属性删除
    2,可以使用@Query(value = "xxx", nativeQuery = true)但是不推荐
    3,把需要显示的字段去掉@JesonIgnore=true
    4,一般表名需要大写,字段名需要小写
    ////////////////////////////spring-boot
    mvn spring-boot:run -Dspring.profiles.active=zslin
    ///////////////////////////////////////////////////////jpa
    http://www.datanucleus.org/products/datanucleus/jpa/query.html

  • 相关阅读:
    OpenGL------光照+染色
    sicily 1345 能量项链
    sicily 1193 Up the Stairs
    sicily 1172 Queens, Knights and Pawns
    sicily 1206 Stacking Cylinders
    模拟退火算法解tsp问题
    js对象的属性可以是一个变量
    vue中/deep/的使用
    MySQL中DATEDIFF函数使用
    js中的this
  • 原文地址:https://www.cnblogs.com/bigjor/p/7417524.html
Copyright © 2011-2022 走看看