groovy

介绍一款 API 敏捷开发工具

末鹿安然 提交于 2021-02-20 07:07:06
作者:棒锤 xie.infoq.cn/article/b5c3a339267e1351c6151b42a 初衷 用尽可能简单的方式,完成尽可能多的需求。通过约定的方式 实现统一的标准。告别加班,拒绝重复劳动,远离搬砖 特性 用于快速开发API接口。不再定义 Controller , Service , Dao , Mybatis , xml , Entity , VO 等对象和方法. 可视化界面,将入参自动封装到可执行的脚本上,支持所有关系性数据库SQL执行语句,非关系型 MONGODB 查询语句.欢迎扩展 完全基于springboot2.x 作为springboot项目的stater方式集成,无侵入性,新老项目都能快速集成 只需编写一行代码即可完成大部分的业务需求开发,使用难度级别(测试 or 运维)也可参与开发 在线动态编译,无需重启,即时生效,多数据源操作 版本控制,历史记录比对,回滚等功能 远程一键发布到线上环境 线上POSTMAN调试,保存POSTMAN信息或三方文档的自动生成,历史调用记录存储,回塑 代码提示,SQL提示,语法提示 用户管理控制,安全性控制,以及历史行为记录 经过多次项目验证,传统业务型开发,服务端效率能够提升3-5倍,前后端联调提升效率1倍,测试效率2倍提升 传统开发步骤: 增加一张表 创建实体对象,映射这张表 创建API入参VO 创建API出参VO

How to create an internal comment on a jira issue using the JIRA Cloud REST API

Deadly 提交于 2021-02-20 04:11:38
问题 It's really hard to find a clear answer about how to create a comment on an issue which is internal only. 回答1: The JIRA Cloud REST API Documentation specifies the following schema for setting properties on comments when creating or updating a comment on an incident https://docs.atlassian.com/jira/REST/cloud/#api/2/issue/{issueIdOrKey}/comment-addComment "properties": { "type": "array", "items": { "title": "Entity Property", "type": "object", "properties": { "key": { "type": "string" }, "value

Groovy replacing place holders of file content similar to multiline-string

醉酒当歌 提交于 2021-02-19 08:09:06
问题 Got the following script which replaces values in the multi line string. def param1 = 'Groovy' def param2 = 'Java' def multiline = """ ${param1} is closely related to ${param2}, so it is quite easy to make a transition. """ //output shows with the replaced values for param1 and param2 println multiline Output is shown as expected: Groovy is closely related to Java, so it is quite easy to make a transition. Issue: Now I am trying to do the same using file instead of multi line string. i.e.,

Remove empty line from a multi-line string with Java

旧时模样 提交于 2021-02-19 01:28:45
问题 I have a multi-line string and some empty lines between other lines. It looks like: def msg = """ AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE TEST FFFFF GGGGGG """ I tried some regex expression with : msg = msg.replaceAll('(\n\\\\s+\n)+', '') Or msg = msg.replaceAll('(\r?\n){2,}', '$1'); But nothing is good about what I'm looking... Is it possible to remove only empty lines? to get something like that : def msg = """ AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE TEST FFFFF GGGGGG """ 回答1: Use regex (?m)^[ \t]*\r

Remove empty line from a multi-line string with Java

元气小坏坏 提交于 2021-02-19 01:27:10
问题 I have a multi-line string and some empty lines between other lines. It looks like: def msg = """ AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE TEST FFFFF GGGGGG """ I tried some regex expression with : msg = msg.replaceAll('(\n\\\\s+\n)+', '') Or msg = msg.replaceAll('(\r?\n){2,}', '$1'); But nothing is good about what I'm looking... Is it possible to remove only empty lines? to get something like that : def msg = """ AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE TEST FFFFF GGGGGG """ 回答1: Use regex (?m)^[ \t]*\r

How to use Jenkins pipeline `options` correctly

霸气de小男生 提交于 2021-02-18 21:12:09
问题 Snippet generator created a properties block for me. First run reported WorkflowScript: 1: The properties section has been renamed as of version 0.8. Use options instead. @ line 1, column 1. pipeline { Replacing properties to options results with the following error: Errors encountered validating Jenkinsfile: WorkflowScript: 4: options can not be empty @ line 4, column 5. options([$class: 'ThrottleJobProperty', Here is the full jenkinsfile for reference pipeline { agent any options([[$class:

介绍一款 API 敏捷开发工具

左心房为你撑大大i 提交于 2021-02-18 21:00:34
点击上方 Java后端 , 选择 设为星标 优质文章,及时送达 初衷 用尽可能简单的方式,完成尽可能多的需求。通过约定的方式 实现统一的标准。告别加班,拒绝重复劳动,远离搬砖 特性 用于快速开发API接口。不再定义 Controller , Service , Dao , Mybatis , xml , Entity , VO 等对象和方法. 可视化界面,将入参自动封装到可执行的脚本上,支持所有关系性数据库SQL执行语句,非关系型 MONGODB 查询语句.欢迎扩展 完全基于springboot2.x 作为springboot项目的stater方式集成,无侵入性,新老项目都能快速集成 只需编写一行代码即可完成大部分的业务需求开发,使用难度级别(测试 or 运维)也可参与开发 在线动态编译,无需重启,即时生效,多数据源操作 版本控制,历史记录比对,回滚等功能 远程一键发布到线上环境 线上POSTMAN调试,保存POSTMAN信息或三方文档的自动生成,历史调用记录存储,回塑 代码提示,SQL提示,语法提示 用户管理控制,安全性控制,以及历史行为记录 经过多次项目验证,传统业务型开发,服务端效率能够提升3-5倍,前后端联调提升效率1倍,测试效率2倍提升 传统开发步骤: 增加一张表 创建实体对象,映射这张表 创建API入参VO 创建API出参VO 创建Controller

介绍一款 API 敏捷开发工具

十年热恋 提交于 2021-02-18 18:33:53
点 击上方“ 掌上编程 ”,选择“ 置顶或者星标 ” 优质文章第一时间送达! 初衷 用尽可能简单的方式,完成尽可能多的需求。通过约定的方式 实现统一的标准。告别加班,拒绝重复劳动,远离搬砖. 特性 用于快速开发API接口。不再定义 Controller , Service , Dao , Mybatis , xml , Entity , VO 等对象和方法. 可视化界面,将入参自动封装到可执行的脚本上,支持所有关系性数据库SQL执行语句,非关系型 MONGODB 查询语句.欢迎扩展 完全基于springboot2.x 作为springboot项目的stater方式集成,无侵入性,新老项目都能快速集成 只需编写一行代码即可完成大部分的业务需求开发,使用难度级别(测试 or 运维)也可参与开发 在线动态编译,无需重启,即时生效,多数据源操作 版本控制,历史记录比对,回滚等功能 远程一键发布到线上环境 线上POSTMAN调试,保存POSTMAN信息或三方文档的自动生成,历史调用记录存储,回塑 代码提示,SQL提示,语法提示 用户管理控制,安全性控制,以及历史行为记录 经过多次项目验证,传统业务型开发,服务端效率能够提升3-5倍,前后端联调提升效率1倍,测试效率2倍提升 传统开发步骤: 增加一张表 创建实体对象,映射这张表 创建API入参VO 创建API出参VO 创建Controller

Jenkins Read a Specific Line of a File in Jenkinsfile with Groovy

99封情书 提交于 2021-02-18 18:10:50
问题 I am trying to read a specific line of an html file in a Jenkins stage with Groovy and save its contents to an environment variable. The problem is, File and readLines() are not allowed. I am able to load a file with env.WORKSPACE = pwd() def file = readFile "${env.WORKSPACE}/file.html" Provided in this answer But how can I access instantly to the contents of line n ? I am using Jenkins 2.32 回答1: Just going to leave documented here, but you can also use readLines(). def file = readFile

Jenkins Read a Specific Line of a File in Jenkinsfile with Groovy

喜夏-厌秋 提交于 2021-02-18 18:07:31
问题 I am trying to read a specific line of an html file in a Jenkins stage with Groovy and save its contents to an environment variable. The problem is, File and readLines() are not allowed. I am able to load a file with env.WORKSPACE = pwd() def file = readFile "${env.WORKSPACE}/file.html" Provided in this answer But how can I access instantly to the contents of line n ? I am using Jenkins 2.32 回答1: Just going to leave documented here, but you can also use readLines(). def file = readFile