groovy

CentOS第一次安装MySQL的完整步骤

左心房为你撑大大i 提交于 2020-04-15 14:56:00
【推荐阅读】微服务还能火多久?>>> 文章来自:http://www.jianshu.com/p/4a41a6df19a6,我自己调整了下 1、官方安装文档 http://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/ 2、下载 Mysql yum包 http://dev.mysql.com/downloads/repo/yum/ 下载到本地再上传到服务器,或者使用wget 直接下载 wget http: //repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm 3、安转软件源 将 platform-and-version-specific-package-name 替换为你下载的rpm名 sudo rpm -Uvh platform- and- version-specific-package- name.rpm 例如 rpm -Uvh mysql57-community-release-el7- 10 .noarch .rpm 4、安装mysql服务端 yum install -y mysql-community- server 如果网络环境不是很好,执行完命令就可以去泡杯茶🍵或者荣耀杀一局(可以自己先下载好相应的rpm包或直接下载...bundle.tar压缩包)

Java 反序列化系列 ysoserial Groovy 1

走远了吗. 提交于 2020-04-14 19:06:53
【推荐阅读】微服务还能火多久?>>> 作者:天融信阿尔法实验室 原文链接: https://mp.weixin.qq.com/s/FdZ9nVjyLGV7eEbYtcm4sg ysoserial简介 ysoserial是一款在Github开源的知名java 反序列化利用工具,里面集合了各种java反序列化payload; 由于其中部分payload使用到的低版本JDK中的类,所以建议自己私下分析学习时使用低版本JDK JDK版本建议在1.7u21以下。 此篇文章为java反序列化系列文章的第一篇Groovy1 原理分析,后续会以ysoserial这款工具为中心,挨个的去分析其中的反序列化payload和gadget,讲完该工具后会继续对工具中没有的java 反序列化漏洞进行讲解,例如 FastJson JackSon,WebLogic等等,并将这些漏洞的exp加入到ysoserial中然后共享和大家一起学习交流。 源码下载地址 https://codeload.github.com/frohoff/ysoserial/zip/master jar包下载地址 https://jitpack.io/com/github/frohoff/ysoserial/master-30099844c6-1/ysoserial-master-30099844c6-1.jar 源码深度解析

centos7修改系统语言为简体中文

ε祈祈猫儿з 提交于 2020-04-13 07:55:09
原文: centos7修改系统语言为简体中文 说明 自己装系统时一般都可以自定义选择系统语言。可是云端服务器一般都是安装好的镜像,默认系统语言为英文,对于初学者可能还会有搞不懂的计算机词汇。这里简单说一下centos7怎么修改系统语言为中文。 修改centos7系统语言 查看系当前语言包 locale 查看系统拥有语言包 locale -a (zh_CN.UTF-8是简体中文,如果没有zh_CN.UTF-8,就安装语言包,如果存在可以直接设置) 安装简体中文语言包 yum install kde-l10n-Chinese 设置为中文 临时修改,重启服务器之后就会还原之前的设置 LANG= "zh_CN.UTF-8" #修改为中文 LANG= "en_US.UTF-8" #修改为英文 永久修改就要把配置写入文件里面 方法(一) vi /etc/locale.conf # #加下面内容到第一行,设置中文 LANG=zh_CN.UTF8 方法(二) localectl set -locale LANG=zh_CN.UTF8 其他 修改时区为亚洲上海 ln -sf /usr/ share /zoneinfo/ Asia /Shanghai / etc/localtime 查看ip时bash: ifconfig: command not found 解决办法 yum install net

java.io.NotSerializableException Error in Pipeline Scripting

偶尔善良 提交于 2020-04-11 08:21:49
问题 I'm using below code to load a Groovy file and to pass parameter: Pipeline Script in jenkins @NonCPS def ld() { def pck = load '/tmp/Provsioning/e.groovy'; return pck.xmlParseData("${params.hos_nam}"); } node { stage ('Deploying Packages'){ def aby = ld(); } } where ${params.hos_nam} is a build parameter and the installpackage groovy follows as below /tmp/Provsioning/e.groovy public class ReadXMLFile { def xmlParseData(String g){ installPackage(a,b,c); input 'proceed' aemRestart(b); } def

美团猫眼电影Android模块化实战总结

蹲街弑〆低调 提交于 2020-04-09 16:36:10
1 写这篇博客的初衷 首先一句话概括:我想把这几个月做的事情记录下来,并且希望尽量详细,希望读者读了这篇文章能够知道项目进行模块化,项目改业务框架可能会遇到哪些问题,具体每个步骤都做什么,而不是大致的了解。 现在很多人都在谈模块化,网上有一大堆的博客实践都在讲这个。很多谈的只是模块与模块之间的解耦,并且大部分讲的是通过router路由进行解耦,其他谈的不多,而且不乏泛泛而谈。但将一个app真正做到解耦,运行。需要解决的事情远远不止解耦。业务架构、进程间通信、资源等处理、解耦方式等都需要解决。恰好对于猫眼模块化整个过程的实施,从头到尾,分析解决各种问题,我陆陆续续的做了几个月。猫眼app的历史版本是一个耦合度很高的一个工程。从这样的一个历史版本到最终的各个业务模块能够独立运行并且能够做进程间通信,会涉及到各个方面的解耦和一些其他东西。我今天我就以该app为例(其他的app进行解耦可能会遇到不同的问题,这点注意一下),完整的讲下猫眼模块化的整个过程。每一个方面没有照搬网络的一些做法,而是分析对比,采用更好的设计方式。比如解耦使用serviceloader,而不是路由进行;比如架构使用更适合我们业务的一种带生命周期的mvp变种。我还会说下具体的花费时间和一些经验,这样大家以后做模块时也心中有数。(提示一下,其实模块化过程所涉及的东西除了文章提及的还有很多。有些未提及,是因为之前已经完成

Gradle(一)安装配置

空扰寡人 提交于 2020-04-09 11:24:37
Gradle是一个基于Apache Ant和Apache Maven概念的项目自动化构建开源工具。它使用一种基于Groovy的特定领域语言(DSL)来声明项目设置,抛弃了基于XML的各种繁琐配置。面向Java应用为主。当前其支持的语言限于Java、Groovy、Kotlin和Scala。 到此不得不说另一个很火的工具maven,众所周知,maven的两大作用: ①:管理jar包 ②:构建项目 使用maven的缺点,XML配置文件的繁琐,特别是项目较大时,pom.xml配置眼花缭乱。 Gradle在maven的基础上,简化了配置文件,自动搜索Gradle等,使得我们创建管理项目更加简单。 一、下载,Gradle是压缩文件,下载解压即可。 https://gradle.org/releases/ 这个是发布版,当然你还可以去 https://services.gradle.org/ 下载更新的版本。本人下载5.2.1的发布版 https://gradle.org/next-steps/?version=5.2.1&format=all 下载完毕后在本地目录解压即可。 二、配置环境变量 :GRADLE_HOME 变量值为Gradle文件解压的实际路径,本文为例:E:\Gradle\gradle-5.2.1-all\gradle-5.2.1   在系统变量 path中加入:%GRADLE

Jenkins Choice parameter Passing to a pipeline Job

╄→尐↘猪︶ㄣ 提交于 2020-04-07 18:41:11
问题 Currently I have a pipeline job which has different paramters where one of this parameters is a Choice parameter. Here is the config.xml output of that job parameter: <hudson.model.ChoiceParameterDefinition> <choices class="java.util.Arrays$ArrayList"> <a class="string-array"> <string>f1</string> <string>f2</string> <string>f3</string> <string>f4</string> </a> </choices> <name>WHERE</name> <description>Something</description> </hudson.model.ChoiceParameterDefinition> Now I can call this job

Groovy: how to test if a property access will be successful?

ぃ、小莉子 提交于 2020-04-07 17:01:32
问题 I have a variable Object foo, which is not null. I want to use foo.bar, but only if it won't bomb me with 'No such property: bar for class: Whatever'. How should I do the following test: if (/*test-here*/) { use(foo.bar) } 回答1: Use object.hasProperty(propertyName) . This will return a truthy value (the property reference) if the property exists. Also object.metaClass.hasProperty(instance, propertyName) is possible. Use object.respondsTo(methodName) to test for method existence. 回答2: I do this

Bundle in JavaFX when you run the executable from a Gradle project?

回眸只為那壹抹淺笑 提交于 2020-04-07 08:03:46
问题 Over the past few days I've been tearing what's left of my hair out trying to get to the Holy Grail: Gradle + Java 11 + JavaFX + writing all my app and testing code in Groovy, not Java. One of several problems is that Groovy 2 (even Groovy 3) can't yet cope with Java 9+ modules, which rules one clever solution out. But I have managed to get a Gradle project together which not only does virtually everything successfully, including the "run" task (from the "application" plugin), and runs tests

Create a directory structure from a path in gradle/groovy

馋奶兔 提交于 2020-04-07 05:17:52
问题 I am implementing a diff package generation task in my project's gradle build from the git command line output. Currently I have a method which will give me a list of changed files from git diff --name-only . What I would like to do is create a directory structure in a new directory which matches the paths of each file. For example: inputting the string repo/dir/file.java would create in an output directory if not already created and inside it the directories head/repo/dir with the current