Iddc train

来自ling
跳转至: 导航搜索

后端开发基础知识

springcloud 介绍

springcloud 介绍

docker 服务自动化发布
比较适合linux环境,我们现在是window环境,以后介绍docker时再介绍相关内容

开发环境搭建

  • intellijj 安装
https://www.jetbrains.com/idea/
  • svn 导入项目
https://cnbejtaxapp03.atrapa.deloitte.com/svn/源代码管理/DrTaxPlatform/trunk/tax-cor
https://cnbejtaxapp03.atrapa.deloitte.com/svn/源代码管理/DrTaxPlatform/trunk/tax-common-dependencies
https://cnbejtaxapp03.atrapa.deloitte.com/svn/源代码管理/DrTaxPlatform/trunk/tax-common-parent
  • Maven 导入依赖包
  • 配置Maven配置C:\Users\xxxxxxxxxxxxxxxx\.m2\settings.xml
  • Iddc maven intelijj idea config.PNG
  • 通过下面的方式将项目导入到一个工作区间
  • Iddc maven intelijj idea config2.PNG
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <localRepository>C:/Users/jasonbwang/.m2</localRepository>
    <interactiveMode>true</interactiveMode>
    <usePluginRegistry/>
    <offline>false</offline>
    <pluginGroups/>

    <servers>
        <server>
            <id>tax-releases</id>
            <username>tax</username>
            <password>tax123456</password>
        </server>
        <server>
            <id>tax-snapshots</id>
            <username>tax</username>
            <password>tax123456</password>
        </server>
        <server>
            <id>tax-3rd-party</id>
            <username>tax</username>
            <password>tax123456</password>
        </server>
    </servers>

    <proxies/>
    <profiles>
        <profile>
            <id>jdk-1.8</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <jdk>1.8</jdk>
            </activation>
            <properties>
                <maven.compiler.source>1.8</maven.compiler.source>
                <maven.compiler.target>1.8</maven.compiler.target>
                <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
            </properties>
            <repositories>
				<!--阿里云主仓库,代理了maven central和jcenter仓库-->
				<repository>
					<id>aliyun</id>
					<name>aliyun</name>
					<url>https://maven.aliyun.com/repository/public</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
				<!--阿里云代理Spring 官方仓库-->
				<repository>
					<id>spring-milestones</id>
					<name>Spring Milestones</name>
					<url>https://maven.aliyun.com/repository/spring</url>
					<releases>
						<enabled>true</enabled>
					</releases>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
                <repository>
                    <id>nexus</id>
                    <url>http://10.172.64.202:58081/repository/ctio-maven-group/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>oschinaPluginRepository</id>
                    <name>local private nexus</name>
                    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <id>public</id>
                    <name>Public Repositories</name>
                    <url>http://10.172.64.202:58081/repository/ctio-maven-group/</url>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
</settings>
  • 启动项目

简单demo与基本编码规范

三层架构

前端和后端

数据库-->model(hibernate)

配置前端路由

  • 如何在前端配置菜单和路由
    • src\router\cor\case\index.js 中配置页面路由
    • menu_region表中设置大框
    • menu_module表中设置中文模块,关联menu_region表
    • homeConstant.js中设置中文模块对应的url
    • 系统管理-视图管理中点击+添加视图
    • 角色管理中选择所配置角色,配置模块

展示api数据

<template>
  <div class="model-libery" id="ModelLibery">
    {{features}}
  </div>
</template>

<script>
  import {findCorCaseFeaturesByPage} from "../../../api/cor/CorCaseFeaturesService";

  export default {

    name: "Success",
    components: {},
    data() {
      return {
        queryParams: {
          pageIndex: 1,
          pageSize: 4,
          recordCount: 0,
        },
        features: []
      }
    },
    methods: {
      async initData() {
        // let params = {};
        // let queryParams = {...this.queryParams};
        console.log(this.queryParams)
        let result = await findCorCaseFeaturesByPage(this.queryParams);
        if (result.success) {
          this.featuresPage = result.result;
          this.features = this.featuresPage.result;
        }
      }
    },
    mounted() {
      this.initData();
    }
  }
</script>

<style>
  .el-main {
    text-align: center;
  }
</style>

Ling-cloud 框架组成与更多代码规范

Ling-cloud