随笔-295  评论-26  文章-1  trackbacks-0
  2016年7月21日



            //允许输入字母、点、回退键、数字
            if (((int)e.KeyChar >= (int)'a' && (int)e.KeyChar <= (int)'z') || (((int)e.KeyChar > 48 && (int)e.KeyChar < 57) || (int)e.KeyChar == 8 || (int)e.KeyChar == 46))
            {
                e.Handled = false;
            }
            else e.Handled = true;



      //允许输入字母、回退键、数字
            if (((int)e.KeyChar >= (int)'a' && (int)e.KeyChar <= (int)'z') || (((int)e.KeyChar > 48 && (int)e.KeyChar < 57) || (int)e.KeyChar == 8))
            {
                e.Handled = false;
            }
            else e.Handled = true; 


// 只能输入字母数字以及中文字
  if ((e.KeyChar != '\b') && (!Char.IsLetter(e.KeyChar)) && (!char.IsDigit(e.KeyChar)))
            {
                e.Handled = true;
            }

//只输入数字
 if (e.KeyChar != 8 && (!Char.IsDigit(e.KeyChar)))
            {
                e.Handled = true;
            }

只能输入数字以及字母X

  if (e.KeyChar != 88 && e.KeyChar != 8 && (!Char.IsDigit(e.KeyChar)))
            {
                e.Handled = true;
            }
posted @ 2020-06-13 10:46 华梦行 阅读(144) | 评论 (0)编辑 收藏
Install-Package NLog.Config -Version 3.2.1



Install-Package NLog -Version 3.2.1
posted @ 2020-01-06 16:10 华梦行 阅读(110) | 评论 (0)编辑 收藏
  • mysql5.7以上版本在常会报关于only_full_group_by的错误,可以在sql_mode中关闭他,网上查找的解
  • 在[mysqld]中添加代码
sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

重启mysql

sudo service mysql restart

mysql5.7以上版本在常会报关于only_full_group_by的错误,可以在sql_mode中关闭他,网上查找的解
查看参数是否存在

mysql> SELECT @@sql_mode;
+------------------------------------------------------------------------------------------------------------------------+
| @@sql_mode                                                                                                             |
+------------------------------------------------------------------------------------------------------------------------+
| STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> SELECT @@GLOBAL.sql_mode;
+------------------------------------------------------------------------------------------------------------------------+
| @@GLOBAL.sql_mode                                                                                                      |
+------------------------------------------------------------------------------------------------------------------------+
| STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
posted @ 2019-09-15 22:02 华梦行 阅读(133) | 评论 (0)编辑 收藏

MYSQL_HOME     解压路径   C:\DevelopTool\MySQL\mysql-5.7.25-winx64    

 

 

 Path     %MYSQL_HOME%\bin



>mysqld --initialize --user=mysql --console
mysqld -install 

先启动服务:

net start MySQL【或者是MySQL57】

修改密码
mysqladmin -uroot -p123456 password 123 


sc delete 服务名例如: sc delete mysql



https://www.cnblogs.com/july7/p/11489029.html

远程访问
use mysql;
GRANT ALL ON *.* TO root@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
flush privileges;
posted @ 2019-09-14 22:51 华梦行 阅读(111) | 评论 (0)编辑 收藏
需要添加一个环境变量POSTMAN_DISABLE_GPU = true。
posted @ 2019-05-18 11:11 华梦行 阅读(477) | 评论 (0)编辑 收藏

在了解REST API URI设计的规则之前,让我们快速浏览一些我们将要讨论的术语。

URIs

REST API使用统一资源标识符(URI)来寻址资源。在当今互联网上,充斥着各种各样的URI设计规则,既有像//api.example.com/louvre/leonardo-da-vinci/mona-lisa这样能够清楚的传达API资源模型的文章,也有很难理解的文章,例如://api.example.com/68dd0-a9d3-11e0-9f1c-0800200c9a66 ;Tim Berners-Lee在他的“Axioms of Web Architecture”一文中将URI的不透明度总结成一句话:

唯一可以使用标识符的是引用对象。在不取消引用时,就不应该查看URI字符串的内容以获取其他信息。 
——蒂姆·伯纳斯 - 李

客户端必须遵循Web的链接范例,将URI视为不透明标识符。

REST API设计人员应该在考虑将REST API资源模型传达给潜在的客户端开发者的前提下,创造URI。在这篇文章中,我将尝试为REST API URI 引入一套设计规则

先跳过规则,URI的通用语法也适用与本文中的URI。RFC 3986定义了通用URI语法,如下所示:

URI = scheme “://” authority “/” path [ “?” query ][ “#” fragment ]

规则1:URI结尾不应包含(/)

这是作为URI路径中处理中最重要的规则之一,正斜杠(/)不会增加语义值,且可能导致混淆。REST API不允许一个尾部的斜杠,不应该将它们包含在提供给客户端的链接的结尾处。

许多Web组件和框架将平等对待以下两个URI: 
http://api.canvas.com/shapes/ 
http://api.canvas.com/shapes

但是,实际上URI中的每个字符都会计入资源的唯一身份的识别中。

两个不同的URI映射到两个不同的资源。如果URI不同,那么资源也是如此,反之亦然。因此,REST API必须生成和传递精确的URI,不能容忍任何的客户端尝试不精确的资源定位。

有些API碰到这种情况,可能设计为让客户端重定向到相应没有尾斜杠的URI(也有可能会返回301 - 用来资源重定向)。

规则2:正斜杠分隔符(/)必须用来指示层级关系

URI的路径中的正斜杠(/)字符用于指示资源之间的层次关系。

例如: 
(http://api.canvas.com/shapes/polygons/quadrilaterals/squares ;

规则3:应使用连字符( - )来提高URI的可读性

为了使您的URI容易让人们理解,请使用连字符( - )字符来提高长路径中名称的可读性。在路径中,应该使用连字符代空格连接两个单词 。

例如: 
http://api.example.com/blogs/guy-levin/posts/this-is-my-first-post

规则4:不得在URI中使用下划线(_)

一些文本查看器为了区分强调URI,常常会在URI下加上下划线。这样下划线(_)字符可能被文本查看器中默认的下划线部分地遮蔽或完全隐藏。

为避免这种混淆,请使用连字符( - )而不是下划线

规则5:URI路径中首选小写字母

方便时,URI路径中首选小写字母,因为大写字母有时会导致一些问题。RFC 3986将URI定义为区分大小写,但scheme 和 host components除外。

例如: 
http://api.example.com/my-folder/my-doc

HTTP://API.EXAMPLE.COM/my-folder/my-doc 
这个URI很好。URI格式规范(RFC 3986)认为该URI与URI#1相同。

http://api.example.com/My-Folder/my-doc 
而这个URI与URI 1和2不同,这可能会导致不必要的混淆。

规则6:文件扩展名不应包含在URI中

在Web上,(.)字符通常用于分隔URI的文件名和扩展名。 
REST API不应在URI中包含人造文件扩展名,来指示邮件实体的格式。相反,他们应该依赖通过Content-Type中的header传递media type,来确定如何处理正文的内容。

http://api.college.com/students/3248234/courses/2005/fall.json 
http://api.college.com/students/3248234/courses/2005/fall

如上所示:不应使用文件扩展名来表示格式。

应鼓励REST API客户端使用HTTP提供的格式选择机制Accept request header。

为了是链接和调试更简单,REST API应该支持通过查询参数来支持媒体类型的选择。

规则7:端点名称是单数还是复数?

keep-it-simple的原则在这里同样适用。虽然一些”语法学家”会告诉你使用复数来描述资源的单个实例是错误的,但实际上为了保持URI格式的一致性建议使用复数形式。

本着API提供商更容易实施和API使用者更容易操作的原则,可以不必纠结一些奇怪的复数(person/people,goose/geese)。

但是应该怎么处理层级关系呢?如果一个关系只能存在于另一个资源中,RESTful原则就会提供有用的指导。我们来看一下这个例子。学生有一些课程。这些课程在逻辑上映射到学生终端,如下所示:

http://api.college.com/students/3248234/courses - 检索id为3248234的学生学习的所有课程的清单。 
http://api.college.com/students/3248234/courses/physics -检索该学生的物理课程

结论

当你在设计REST API服务时,您必须注意这些由URI定义的资源。

正在构建的服务中的每个资源将至少有一个URI标识它。这个URI最好是有意义的,且能充分描述资源。URI应遵循可预测的层次结构,用来提高其可理解性,可用性:可预测的意义在于它们是一致的,它的层次结构在数据关系上是有意义的。

RESTful API是为使用者编写的。URI的名称和结构应该能够向使用者传达更清晰的含义。通过遵循上述规则,您将创建一个更清晰的的REST API与更友好的客户端。这些并不是REST的规则或约束,仅仅是API的增强和补充。

我也建议你来看看http://blog.restcase.com/5-basic-rest-api-design-guidelines/这篇文章。

最后,望大家牢记:你在为你的客户端设计API URI,而不仅仅是为你的数据。

posted @ 2017-06-26 09:50 华梦行 阅读(205) | 评论 (0)编辑 收藏

* this.getClass().getClassLoader().getResourceAsStream("testVariables.bpmn")

       classpath根目录下加载指定名称的文件

 * this.getClass().getResourceAsStream("testVariables.bpmn")   

       从当前包下加载指定名称的文件

 * this.getClass().getResourceAsStream("/testVariables.bpmn") 

       从classpath根目录下加载指定名称的文件

posted @ 2017-06-19 14:45 华梦行 阅读(105) | 评论 (0)编辑 收藏
package org.gdharley.activiti.integration.rest;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.activiti.engine.ActivitiException;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.Expression;
import org.activiti.engine.delegate.JavaDelegate;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.methods.*;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.SSLContextBuilder;
import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpMethod;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;


/**
 * Created by gharley on 5/2/17.
 
*/
public class SimpleRestDelegate implements JavaDelegate {
    private static final Logger logger = LoggerFactory.getLogger(SimpleRestDelegate.class);

    protected Expression endpointUrl;
    protected Expression httpMethod;
    protected Expression isSecure;
    protected Expression payload;

//    一个Content-Type是application/json的请求,具体看起来是这样的:
//    POST /some-path HTTP/1.1
//    Content-Type: application/json
//
//    { "foo" : "bar", "name" : "John" }
//
//
//    { "foo" : "bar", "name" : "John" } 就是这个请求的payload



    protected Expression headers;
    protected Expression responseMapping;

    protected ObjectMapper objectMapper = new ObjectMapper();

    // Create a mixin to force the BasicNameValuePair constructor
    protected static abstract class BasicNameValuePairMixIn {
        private BasicNameValuePairMixIn(@JsonProperty("name") String name, @JsonProperty("value") String value) {
        }
    }

    public void execute(DelegateExecution execution) throws Exception {
        logger.info("Started Generic REST call delegate");

        if (endpointUrl == null || httpMethod == null) {
            throw new IllegalArgumentException("An endpoint URL and http method are required");
        }

        String restUrl = getExpressionAsString(endpointUrl, execution);
        String payloadStr = getExpressionAsString(payload, execution);
        String headersJSON = getExpressionAsString(headers, execution); // [{"name":"headerName", "value":"headerValue"}]
        String method = getExpressionAsString(httpMethod, execution);
        String rMapping = getExpressionAsString(responseMapping, execution);
        String secure = getExpressionAsString(isSecure, execution);
        String scheme = secure == "true" ? "https" : "http";

        // validate URI and create create request
        URI restEndpointURI = composeURI(restUrl, execution);

        logger.info("Using Generic REST URI " + restEndpointURI.toString());

        HttpRequestBase httpRequest = createHttpRequest(restEndpointURI, scheme, method, headersJSON, payloadStr, rMapping);

        // create http client
        CloseableHttpClient httpClient = createHttpClient(httpRequest, scheme, execution);

        // execute request
        HttpResponse response = executeHttpRequest(httpClient, httpRequest);

        // map response to process instance variables
        if (responseMapping != null) {
            mapResponse(response, rMapping, execution);
        }

        logger.info("Ended Generic REST call delegate");

    }

    protected URI composeURI(String restUrl, DelegateExecution execution)
            throws URISyntaxException {

        URIBuilder uriBuilder = null;
        uriBuilder = encodePath(restUrl, uriBuilder);
        return uriBuilder.build();
    }

    protected URIBuilder encodePath(String restUrl, URIBuilder uriBuilder) throws URISyntaxException {

        if (StringUtils.isNotEmpty(restUrl)) {

            // check if there are URL params
            if (restUrl.indexOf('?') > -1) {

                List<NameValuePair> params = URLEncodedUtils.parse(new URI(restUrl), "UTF-8");

                if (params != null && !params.isEmpty()) {
                    restUrl = restUrl.substring(0, restUrl.indexOf('?'));
                    uriBuilder = new URIBuilder(restUrl);
                    uriBuilder.addParameters(params);

                }
            } else {
                uriBuilder = new URIBuilder(restUrl);
            }
        }

        return uriBuilder;
    }

    protected HttpRequestBase createHttpRequest(URI restEndpointURI, String scheme, String httpMethod, String headers, String payload, String responseMapping) {

        if (StringUtils.isEmpty(httpMethod)) {
            throw new ActivitiException("no HTTP method provided");
        }
        if (restEndpointURI == null) {
            throw new ActivitiException("no REST endpoint URI provided");
        }

        HttpRequestBase httpRequest = null;
        HttpMethod parsedMethod = HttpMethod.valueOf(httpMethod.toUpperCase());
        StringEntity input;
        URIBuilder builder = new URIBuilder(restEndpointURI);

        switch (parsedMethod) {
            case GET:
                try {
                    httpRequest = new HttpGet(builder.build());
                    httpRequest = addHeadersToRequest(httpRequest, headers);
                } catch (URISyntaxException use) {
                    throw new ActivitiException("Error while building GET request", use);
                }
                break;
            case POST:
                try {
                    httpRequest = new HttpPost(builder.build());
                    input = new StringEntity(payload);
//                input.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
                    ((HttpPost) httpRequest).setEntity(input);
                    httpRequest = addHeadersToRequest(httpRequest, headers);
                    break;
                } catch (Exception e) {
                    throw new ActivitiException("Error while building POST request", e);
                }
            case PUT:
                try {
                    httpRequest = new HttpPut(builder.build());
                    input = new StringEntity(payload);
//                input.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
                    ((HttpPut) httpRequest).setEntity(input);
                    httpRequest = addHeadersToRequest(httpRequest, headers);
                    break;
                } catch (Exception e) {
                    throw new ActivitiException("Error while building PUT request", e);
                }
            case DELETE:
                try {
                    httpRequest = new HttpDelete(builder.build());
                    httpRequest = addHeadersToRequest(httpRequest, headers);
                } catch (URISyntaxException use) {
                    throw new ActivitiException("Error while building DELETE request", use);
                }
                break;
            default:
                throw new ActivitiException("unknown HTTP method provided");
        }

        return httpRequest;
    }


    protected CloseableHttpClient createHttpClient(HttpRequestBase request, String scheme, DelegateExecution execution) {

        SSLConnectionSocketFactory sslsf = null;

        // Allow self signed certificates and hostname mismatches.
        if (StringUtils.equalsIgnoreCase(scheme, "https")) {
            try {
                SSLContextBuilder builder = new SSLContextBuilder();
                builder.loadTrustMaterial(nullnew TrustSelfSignedStrategy());
                sslsf = new SSLConnectionSocketFactory(builder.build(), SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
            } catch (Exception e) {
                logger.warn("Could not configure HTTP client to use SSL", e);
            }
        }

        HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();

        if (sslsf != null) {
            httpClientBuilder.setSSLSocketFactory(sslsf);
        }

        return httpClientBuilder.build();
    }

    protected HttpResponse executeHttpRequest(CloseableHttpClient httpClient, HttpRequestBase httpRequest) {

        CloseableHttpResponse response = null;
        try {
            response = httpClient.execute(httpRequest);
        } catch (IOException e) {
            throw new ActivitiException("error while executing http request: " + httpRequest.getURI(), e);
        }

        if (response.getStatusLine().getStatusCode() >= 400) {
            throw new ActivitiException("error while executing http request " + httpRequest.getURI() + " with status code: "
                    + response.getStatusLine().getStatusCode());
        }

        return response;
    }

    protected void mapResponse(HttpResponse response, String responseMapping, DelegateExecution execution) {

        if (responseMapping == null || responseMapping.trim().length() == 0) {
            return;
        }

        JsonNode jsonNode = null;
        try {
            String jsonString = EntityUtils.toString(response.getEntity());
            jsonNode = objectMapper.readTree(jsonString);

        } catch (Exception e) {
            throw new ActivitiException("error while parsing response", e);
        }

        if (jsonNode == null) {
            throw new ActivitiException("didn't expect an empty response body");
        }
        execution.setVariable(responseMapping, jsonNode.toString());
    }

    protected HttpRequestBase addHeadersToRequest(HttpRequestBase httpRequest, String headerJSON) {
        Boolean contentTypeDetected = false;
        if (headerJSON != null) {
            // Convert JSON to array
            try {
                // configuration for Jackson/fasterxml
                objectMapper.addMixInAnnotations(BasicNameValuePair.class, BasicNameValuePairMixIn.class);
                NameValuePair[] headers = objectMapper.readValue(headerJSON, BasicNameValuePair[].class);
                for (NameValuePair header : headers) {
                    httpRequest.addHeader(header.getName(), header.getValue());
                    if (header.getName().equals(HTTP.CONTENT_TYPE)) {
                        contentTypeDetected = true;
                    }
                }
            } catch (Exception e) {
                throw new ActivitiException("Unable to parse JSON header array", e);
            }
        }
        // Now add content type if necessary
        if (!contentTypeDetected) {
            httpRequest.addHeader(HTTP.CONTENT_TYPE, "application/json");
        }
        return httpRequest;
    }

    /**
     * 
@return string value of expression.
     * 
@throws {@link IllegalArgumentException} when the expression resolves to a value which is not a string
     *                or if the value is null.
     
*/
    protected String getExpressionAsString(Expression expression, DelegateExecution execution) {
        if (expression == null) {
            return null;
        } else {
            Object value = expression.getValue(execution);
            if (value instanceof String) {
                return (String) value;
            } else {
                throw new IllegalArgumentException("Expression does not resolve to a string or is null: " + expression.getExpressionText());
            }
        }
    }
}
posted @ 2017-05-26 08:01 华梦行 阅读(216) | 评论 (0)编辑 收藏

1、概述

activiti系统一共有23个表,包括流程定义表、一般数据信息表、流程运行实例表、流程历史记录表、用户用户组表。

2、Activiti 流程定义表

流程定义表,流程定义表也可以叫做是静态资源库,静态资源包括图片、定义规则等。它有部署信息表、流程模型表、流程定义表

1、ACT_RE_DEPLOYMENT(部署信息表)

包括:部署流程名称、类型、部署时间

2、ACT_RE_MODEL(模型表)

名称,key、类型、创建时间、最后修改时间、版本、数据源信息、部署ID、编辑源值ID、编辑源额外值ID(外键ACT_GE_BYTEARRAY )

3、ACT_RE_PROCDEF(流程定义表) 

包括流程定义、类型、流程名称、流程key、版本号、部署ID、资源名称、图片资源名称、描述信息、是否从key启动、暂停状态。

3、Activiti 运行实例表

运行实例表记录流程流转过程中产生的数据,一般数据分为两个部分流程数据、业务数据。流程数据是指activiti流程引擎流转过程中的数据,包括流程执行实例数据接、任务数据、执行任务人员信息、变量信息。业务数据则是流程过程中保存的表单数据,例如:如请假的请假单数据、报销单数据、审批意见信息等,此部分数据一般需要自己建数据表进行保存,在之前的jbpm4中没有保存业务数据。

1、ACT_RU_EVENT_SUBSCR(事件子脚本)作用未知

事件名称(EVENT_NAME_)、事件类型(EVENT_TYPE_)、流程执行ID(EXECUTION_ID_)、流程实例ID(PROC_INST_ID_)、活动ID(ACTIVITY_ID_)、配置信息(CONFIGURATION_)、创建时间(CREATED_)

2、ACT_RU_EXECUTION(执行中流程执行)核心我的代办任务查询表

流程实例ID(PROC_INST_ID_),业务key(BUSINESS_KEY_)、父执行流程(PARENT_ID_)、流程定义Id(外键PROC_DEF_ID_)、实例id(ACT_ID_)、激活状态(IS_ACTIVE_)、并发状态(is_concurrent)、is_scope、is_evnet_scope、暂停状态(suspension_state)、缓存结束状态(cached_end_state)

3、ACT_RU_IDENTITYLINK(身份联系)

用户组ID(GROUP_ID_)、用户组类型(TYPE_)、用户ID(USER_ID_)、任务Id(外键:TASK_ID_)、流程实例ID(外键:PROC_INST_ID_)、流程定义Id(外键:PROC_DEF_ID_)

4、ACT_RU_JOB(运行中的任务)

5、ACT_RU_TASK(执行中实时任务)代办任务查询表

实例id(外键EXECUTION_ID_)、流程实例ID(外键PROC_INST_ID_)、流程定义ID(PROC_DEF_ID_)、任务名称(NAME_)、父节任务ID(PARENT_TASK_ID_)

、任务描述(DESCRIPTION_)、任务定义key(TASK_DEF_KEY_)、所属人(OWNER_)、代理人员 (ASSIGNEE_)、代理团(DELEGATION_)、优先权(PRIORITY_)、创建时间(CREATE_TIME_)、执行时间(DUE_DATE_)、暂停状态(SUSPENSION_STATE_)

6、ACT_RU_VARIABLE(实时变量)

变量名称(NAME_)、编码类型(TYPE_)、执行实例ID(EXECUTION_ID_)、流程实例Id(PROC_INST_ID_)、任务id(TASK_ID_)、字节组ID(BYTEARRAY_ID_)、DOUBLE_、LONG_、TEXT_、TEXT2_

3、流程历史记录

流程历史信息表,activiti历史记录表包括节点信息表、附件信息表、历史审批记录表、理想详细信息表、历史身份信息表、流程实例历史表、任务历史表、历史变量表。(节点信息表、附件信息表、历史审批记录表、理想详细信息表、历史身份信息表)这些表目前还未知是如何用的。(流程实例历史表、任务历史表、历史变量)三个表可以查询我已完成任务、任务追踪等。

1、ACT_HI_ACTINST(活动实例信息)

流程定义ID(PROC_DEF_ID_)、流程实例ID(PROC_INST_ID_)、流程执行ID(EXECUTION_ID_)、活动ID(ACT_ID_)、活动名称(TASK_ID_)、活动类型(ACT_TYPE_)、任务ID、(TASK_ID_)、请求流程实例ID(CALL_PROC_INST_ID_)、代理人员(ASSIGNEE_)、开始时间(START_TIME_)、结束时间(END_TIME_)、时长(DURATION_)

2、ACT_HI_ATTACHMENT(附件信息)

用户id(USER_ID_)、名称(NAME_)、描述(DESCRIPTION_)、类型(TYPE_)、任务Id(TASK_ID_)、流程实例ID(PROC_INST_ID_)、连接(URL_)、内容Id(CONTENT_ID_)

3、ACT_HI_COMMENT(历史审批信息)

类型(TYPE_)、时间(TIME_)、用户Id(USER_ID_)、任务Id(TASK_ID_)、流程实例Id(PROC_INST_ID_)、活动(ACTION_)、消息(MESSAGE_)、全部消息(FULL_MSG_)

4、ACT_HI_DETAIL(历史详细信息)

数据类型(TYPE_)、创建时间(TIME_)、名称(NAME_)、流程实例ID(PROC_INST_ID_)、执行实例Id(EXECUTION_ID_)、任务Id(TASK_ID_)、活动实例Id(ACT_INST_ID_)、变量类型(VAR_TYPE_)、字节数组Id、DOUBLE_、LONG_、值(TEXT_)、值2(TEXT2_)

5、ACT_HI_IDENTITYLINK(历史身份信息)

任务Id(TASK_ID_)、流程实例Id(PROC_INST_ID_)、userId(USER_ID_)、用户组类型Type(TYPE_)、用户组ID(GROUP_ID_)

6、ACT_HI_PROCINST(历史流程实例信息)核心表

流程实例ID(PROC_INST_ID_)、业务Key(BUSINESS_KEY_)、流程定义Id(PROC_DEF_ID_)、开始时间(START_TIME_)、结束时间(END_TIME_)、时长(DURATION_)、发起人员Id(START_USER_ID_)、开始节点(START_ACT_ID_)、结束节点(END_ACT_ID_)、超级流程实例Id(SUPER_PROCESS_INSTANCE_ID_)、删除理由(DELETE_REASON_)

7、ACT_HI_TASKINST(历史任务流程实例信息)核心表

流程实例ID(PROC_INST_ID_)、任务定义Key(BUSINESS_KEY_)、流程定义Id(PROC_DEF_ID_)、执行ID(EXECUTION_ID_)、名称(NAME_)、父任务iD(PARENT_TASK_ID_)、描述(DESCRIPTION_)、所属人(OWNER_)、代理人(ASSIGNEE_)、开始时间(START_TIME_)、结束时间(END_TIME_)、时长(DURATION_)、删除理由(DELETE_REASON__)、优先级(PRIORITY_)、应完成时间(DUE_DATE_)、表单key(FORM_KEY_)

8、ACT_HI_VARINST(历史变量信息)

流程实例ID(PROC_INST_ID_)、执行ID(EXECUTION_ID_)、任务Id、名称(NAME_)、变量(TASK_ID_)、类型(VAR_TYPE_)、字节数组ID(BYTEARRAY_ID_)、DOUBLE_、LONG_、TEXT_、TEXT2_

4、一般数据

1、ACT_GE_BYTEARRAY(字节数据表)

名称(NAME_)、部署Id(DEPLOYMENT_ID_)、字节数据(BYTES_)、发生的(GENERATED_)

2、ACT_GE_PROPERTY(一般属性表)

名称(NAMe_)、值(VALUe_)

5、用户用户组表

Activit 的用户用户组表,包括用户信息、用户组信息、用户与用户组间的关系、用户信息与用户之间的关系。在实际开发中未采用,用的实际系统中用户。

1、ACT_ID_GROUP(用户组表)

名称(NAME_)、类型(TYPE_)

2、ACT_ID_USER(用户表)

姓(FIRST_)、名称(LAST_)、邮件(EMAIL_)、密码(PWD_)、头像Id (PICTURE_ID_)

3、ACT_ID_INFO(用户信息表)

用户Id(USER_ID_)、类型(TYPE_)、formINPut名称(KEY_)、值(VALUE_)、密码(PASSWORD_)、父节点(PARENT_ID_)

4、ACT_ID_MEMBERSHIP(用户用户组关联表)

用户Id(user_ID_)、用户组Id(group_Id)

Activiti表结构分析完成,花了5个小时,还有很多问题不明白。后续慢慢开发过程中再理一次表之间关系吧,初步想法在系统中需要扩建表,把业务数据和流程数据分开。

posted @ 2017-05-16 16:31 华梦行 阅读(2046) | 评论 (0)编辑 收藏
     摘要: Activiti工作流引擎数据库表结构 数据库表的命名 Acitiviti数据库中表的命名都是以ACT_开头的。第二部分是一个两个字符用例表的标识。此用例大体与服务API是匹配的。 l  ACT_RE_*:’RE’表示repository。带此前缀的表包含的是静态信息,如,流程定义,流程的资源(图片,规则等)。 l  ACT_RU_*:̵...  阅读全文
posted @ 2017-05-15 22:23 华梦行 阅读(211) | 评论 (0)编辑 收藏
@Transient 可选 @Transient表示该属性并非一个到数据库表的字段的映射,ORM框架将忽略该属性. 如果一个属性并非数据库表的字段映射,就务必将其标示为@Transient,否则,ORM框架默认其注解为@Basic 示例: //根据birth计算出age属性 @Transient public int getAge() { return getYear(new Date()) - getYear(birth); } 注意是加在get方法上的
posted @ 2017-05-10 16:59 华梦行 阅读(1069) | 评论 (0)编辑 收藏
Snmpwalk –v 2 –c public 192.168.20.114 1.3.6.1.2.1.2.2.1.3
snmpget -r:127.0.0.1 -o:.1.3.6.1.2.1.25.3.3.1.2
E:\>snmpget -r:127.0.0.1 -o:.1.3.6.1.2.1.1.1.0
SnmpGet v1.01 - Copyright (C) 2009 SnmpSoft Company
[ More useful network tools on http://www.snmpsoft.com ]
OID=.1.3.6.1.2.1.1.1.0
Type=OctetString
Value=Hardware: Intel64 Family 6 Model 60 Stepping 3 AT/AT COMPATIBLE - Software
: Windows Version 6.1 (Build 7601 Multiprocessor Free)
snmpwalk -v:2c -c:public -r:127.0.0.1
posted @ 2017-03-22 15:28 华梦行 阅读(116) | 评论 (0)编辑 收藏

Druid是什么?

Druid是一个JDBC组件,它包括四个部分:

http://download.csdn.net/download/feelnature/1580901
http://tomcat.apache.org/tomcat-8.5-doc/monitoring.html#Enabling_JMX_Remote

http://download.csdn.net/detail/qq_21163257/9695557

 

  • DruidDriver 代理Driver,能够提供基于Filter-Chain模式的插件体系。
  • DruidDataSource 高效可管理的数据库连接池。
  • SQLParser
  • 扩展组件
  • Binary: http://code.alibabatech.com/mvn/releases/com/alibaba/druid/0.1.2/druid-0.1.2.jar
  • Source: http://code.alibabatech.com/mvn/releases/com/alibaba/druid/0.1.2/druid-0.1.2-sources.jar

Druid可以做什么?

  • 可以监控数据库访问性能,Druid内置提供了一个功能强大的StatFilter插件,能够详细统计SQL的执行性能,这对于线上分析数据库访问性能有帮助。
  • 替换DBCP和C3P0。Druid提供了一个高效、功能强大、可扩展性好的数据库连接池。
  • 数据库密码加密。直接把数据库密码写在配置文件中,这是不好的行为,容易导致安全问题。DruidDruiver和DruidDataSource都支持PasswordCallback。
  • SQL执行日志,Druid提供了不同的LogFilter,能够支持Common-Logging、Log4j和JdkLog,你可以按需要选择相应的LogFilter,监控你应用的数据库访问情况。
  • 扩展JDBC,如果你要对JDBC层有编程的需求,可以通过Druid提供的Filter机制,很方便编写JDBC层的扩展插件。

DruidDriver,是一个ProxyJdbcDriver,它提供了Filter-Chain模式的扩展机制,使得在Jdbc扩展编程特别方便。

Druid提供了一些内置的扩展机制,包括StatLogTrace、HA等扩展。


DruidDataSource是一个数据库连接池的实现,它的设计目标是提供一个当前最好的数据库连接池,在性能、扩展性等方面取得最合适的平衡,取代DBCP、C3P0等连接池。

  • 高性能。测试数据表明,Druid比DBCP、C3P0、BoneCP的性能都好很多。具体请看测试数据
  • 可管理性,DruidDataSource本身提供了很多监控属性,具体看这里。DruidDataSource支持StatFilter,具体配置看 这里
  • 可扩展性,提供基于Filter-Chain模式的扩展机制。具体自定义扩展的例子看这里
  • 替换DBCP,配置和DBCP兼容,可以方便替换DBCP。
  • 适合大规模应用。结合Alibaba使用数据库连接池的经验,避免一些已知问题,例如数据库不可用恢复之后产生的连接风暴问题等。

设计

这是DruidDataSource的设计图示:
http://code.alibabatech.com/svn/druid/trunk/doc/druid-pool.txt
如果发现有乱码,请选择utf-8的编码方式查看。

Druid提供一个手工编写的高性能的方便扩展的SQL Parser。将会支持MySQL、Oracle等流行关系数据库的SQL Parser。

Parser组件包括如下几个部分:

  • Lexer 词法解析
  • Parser,Parser包括ExprParser,各种StatementParser。
  • AST, Abstract Syntax Tree。ParserParse出来的结果就是AST。
  • Visitor。对AST做各种处理,比如FormatOutput,遍历等等。

简介

 

Druid提供了强大的监控功能,能够监控连接池行为和SQL执行情况,让你能够详细了解应用的数据库访问行为。

监控对象

  • Druid的统计信息定义代码实现在com/alibaba/druid/stat下。所有的Stat都全局静态变量的方式保存,这样做使得外部获取监控信息更容易。
  • 获取Druid监控信息的入口是com.alibaba.druid.stat.JdbcStatManager
  • Druid的监控统计信息都是通过StatFilter来实现的,如果你需要数据源进行监控,那你需要启用StatFilter
 
posted @ 2017-03-21 00:11 华梦行 阅读(255) | 评论 (0)编辑 收藏
http://repo.spring.io/release/org/springframework/spring/4.3.6.RELEASE/
http://spring.io/tools/sts http://www.loveweir.com/posts/view/19
https://github.com/rahulyewale/springmvcjpa
http://download.csdn.net/download/jiuqiyuliang/8640621
http://blog.csdn.net/suzunshou/article/details/49949005
https://repo1.maven.org/maven2/org/mybatis/mybatis/
http://blog.csdn.net/jiuqiyuliang/article/details/45132493/
https://github.com/mybatis/generator/releases
posted @ 2017-03-19 22:39 华梦行 阅读(131) | 评论 (0)编辑 收藏
今天从windows上导出一个sql执行文件,再倒入到unbutn中,结果出现乱码,折腾7-8分钟, 
解决方式 
在导出mysql sql执行文件的时候,指定一下编码格式: 
复制代码 代码如下:
mysqldump -uroot -p --default-character-set=utf8 mo(dbname) > E://xxxx.sql 
导入的时候OK了 
执行如下 
复制代码 代码如下:
mysql -u root -p --default-character-set=utf8 
use dbname 
source /root/newsdata.sql 
posted @ 2016-07-21 13:33 华梦行 阅读(118) | 评论 (0)编辑 收藏