首页 文章 精选 留言 我的

精选列表

搜索[API集成],共10000篇文章
优秀的个人博客,低调大师

gitlab+jenkins+maven+docker持续集成(八)——jenkins用户组权限对应不同视图

首先安装插件 Role-based Authorization Strategy 安装后在Configure Global Security选择 然后进行系统管理 1、Manage Roles 我这里创建Test_Group这个组,注意Project roles这里的Pattern Test.*这个意思就是在试图里含有Test开头的项目的权限。(注意是Test.*形式语法) 2、Assign Roles 这里选择我们创建好的用户,并加到Test_group里面 然后我们用该用户登录,发现只能看到Test头的项目了。 本文转自 jackjiaxiong 51CTO博客,原文链接:http://blog.51cto.com/xiangcun168/1958961

优秀的个人博客,低调大师

gitlab+jenkins+maven+docker持续集成(九)——centos7 ansible安装及问题汇总

centos7最小化安装ansibles 1、error: cffi 1.6.0 is installed but cffi>=1.7 is required by set(['cryptography']) yumremove-ypython-cffi pipinstallcffi>=1.8.0 2、easy_install command not found wget https://bootstrap.pypa.io/ez_setup.py -O - | python 安装ansible #easy_installsimplejson #easy_installpip #yuminstallgccpython-devel #easy_installansible ansible验证安装 设置无密码ssh访问远程主机: 1 2 #ssh-keygen-trsa #ssh-copy-id-i~/.ssh/id_rsa.pubroot@192.168.10.24 创建ansible主机列表: 默认路径 /etc/ansible/hosts 主机列表可以是静态配置文件,可通过 -i 选项指定。 1 2 3 4 #mkdir/etc/ansibles #vi/etc/ansible/hosts [ test ] 192.168.10.24 测试远程主机的运行状态 1 2 3 4 5 #ansibletest-mping 192.168.10.24|SUCCESS=>{ "changed" : false , "ping" : "pong" } 本文转自 jackjiaxiong 51CTO博客,原文链接:http://blog.51cto.com/xiangcun168/1959217

优秀的个人博客,低调大师

iOS:IOS项目集成ShareSDK实现第三方登录、分享、关注等功能。

原文链接:http://blog.csdn.net/daleiwang/article/details/34081231 (3)在项目的AppDelegate中一般情况下有三个操作,第一是注册ShareSDK,第二是注册各个平台的账号,第三是关于微信等应用的回调处理。 // // AppDelegate.m // ShareSDKTest // // Created by wangdalei on . // Copyright (c). All rights reserved. // #import "AppDelegate.h" #import "RootViewController.h" #import <ShareSDK/ShareSDK.h> #import "WeiboApi.h" #import <TencentOpenAPI/QQApiInterface.h> #import <TencentOpenAPI/TencentOAuth.h> #import "WXApi.h" #import <TencentOpenAPI/QQApiInterface.h> #import <TencentOpenAPI/TencentOAuth.h> @implementation AppDelegate @synthesize rootVC; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; if (self.rootVC==nil) { self.rootVC = [[RootViewController alloc]initWithNibName:@"RootViewController" bundle:nil]; } UINavigationController *rootNav = [[UINavigationController alloc]initWithRootViewController:self.rootVC]; self.window.rootViewController = rootNav; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; <span style="color:#ff0000;">[ShareSDK registerApp:@"1a2e7ab5fb6c"];</span> <span style="color:#3366ff;"> //添加新浪微博应用 注册网址 http://open.weibo.com wdl@pmmq.com 此处需要替换成自己应用的 [ShareSDK connectSinaWeiboWithAppKey:@"3201194191" appSecret:@"0334252914651e8f76bad63337b3b78f" redirectUri:@"http://appgo.cn"]; //添加腾讯微博应用 注册网址 http://dev.t.qq.com wdl@pmmq.com 此处需要替换成自己应用的 [ShareSDK connectTencentWeiboWithAppKey:@"801307650" appSecret:@"ae36f4ee3946e1cbb98d6965b0b2ff5c" redirectUri:@"http://www.sharesdk.cn" wbApiCls:[WeiboApi class]]; //添加QQ空间应用 注册网址 http://connect.qq.com/intro/login/ wdl@pmmq.com 此处需要替换成自己应用的 [ShareSDK connectQZoneWithAppKey:@"100371282" appSecret:@"aed9b0303e3ed1e27bae87c33761161d" qqApiInterfaceCls:[QQApiInterface class] tencentOAuthCls:[TencentOAuth class]]; //此参数为申请的微信AppID wdl@pmmq.com 此处需要替换成自己应用的 [ShareSDK connectWeChatWithAppId:@"wx4868b35061f87885" wechatCls:[WXApi class]]; //添加QQ应用 该参数填入申请的QQ AppId wdl@pmmq.com 此处需要替换成自己应用的 [ShareSDK connectQQWithQZoneAppKey:@"100371282" qqApiInterfaceCls:[QQApiInterface class] tencentOAuthCls:[TencentOAuth class]];</span> return YES; } - (void)applicationWillResignActive:(UIApplication *)application { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } - (void)applicationDidEnterBackground:(UIApplication *)application { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - (void)applicationWillEnterForeground:(UIApplication *)application { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - (void)applicationDidBecomeActive:(UIApplication *)application { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - (void)applicationWillTerminate:(UIApplication *)application { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } <span style="color:#ff6600;">#pragma mark - WX回调 - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { return [ShareSDK handleOpenURL:url wxDelegate:self]; } - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return [ShareSDK handleOpenURL:url sourceApplication:sourceApplication annotation:annotation wxDelegate:self]; } #pragma mark - WXApiDelegate /*! @brief 收到一个来自微信的请求,第三方应用程序处理完后调用sendResp向微信发送结果 * * 收到一个来自微信的请求,异步处理完成后必须调用sendResp发送处理结果给微信。 * 可能收到的请求有GetMessageFromWXReq、ShowMessageFromWXReq等。 * @param req 具体请求内容,是自动释放的 */ -(void) onReq:(BaseReq*)req{ } /*! @brief 发送一个sendReq后,收到微信的回应 * * 收到一个来自微信的处理结果。调用一次sendReq后会收到onResp。 * 可能收到的处理结果有SendMessageToWXResp、SendAuthResp等。 * @param resp具体的回应内容,是自动释放的 */ -(void) onResp:(BaseResp*)resp{ } @end (4)信息分享。 -(IBAction)share:(id)sender{ NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"card" ofType:@"png"]; //构造分享内容 id<ISSContent> publishContent = [ShareSDK content:@"分享内容测试" defaultContent:@"默认分享内容测试,没内容时显示" image:[ShareSDK imageWithPath:imagePath] title:@"pmmq" url:@"http://www.sharesdk.cn" description:@"这是一条测试信息" mediaType:SSPublishContentMediaTypeNews]; [ShareSDK showShareActionSheet:nil shareList:nil content:publishContent statusBarTips:YES authOptions:nil shareOptions: nil result:^(ShareType type, SSResponseState state, id<ISSPlatformShareInfo> statusInfo, id<ICMErrorInfo> error, BOOL end) { if (state == SSResponseStateSuccess) { NSLog(@"分享成功"); } else if (state == SSResponseStateFail) { NSLog(@"分享失败"); } }]; } (5)登录、登出、获取授权信息、关注制定微博 #import "LoginViewController.h" #import <ShareSDK/ShareSDK.h> @interface LoginViewController () -(IBAction)loginWithSina:(id)sender; -(IBAction)loginWithQQ:(id)sender; -(IBAction)loginoutWithSina:(id)sender; -(IBAction)loginoutWithQQ:(id)sender; -(IBAction)guanzhuUs:(id)sender; -(void)reloadStateWithType:(ShareType)type; @end @implementation LoginViewController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { } return self; } - (void)viewDidLoad { [super viewDidLoad]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } - (IBAction)loginWithSina:(id)sender { [ShareSDK getUserInfoWithType:ShareTypeSinaWeibo authOptions:nil result:^(BOOL result, id<ISSPlatformUser> userInfo, id<ICMErrorInfo> error) { NSLog(@"%d",result); if (result) { //成功登录后,判断该用户的ID是否在自己的数据库中。 //如果有直接登录,没有就将该用户的ID和相关资料在数据库中创建新用户。 [self reloadStateWithType:ShareTypeSinaWeibo]; } }]; } -(IBAction)loginWithQQ:(id)sender{ [ShareSDK getUserInfoWithType:ShareTypeQQSpace authOptions:nil result:^(BOOL result, id<ISSPlatformUser> userInfo, id<ICMErrorInfo> error) { NSLog(@"%d",result); if (result) { //成功登录后,判断该用户的ID是否在自己的数据库中。 //如果有直接登录,没有就将该用户的ID和相关资料在数据库中创建新用户。 [self reloadStateWithType:ShareTypeQQSpace]; } }]; } -(IBAction)loginoutWithSina:(id)sender{ [ShareSDK cancelAuthWithType:ShareTypeSinaWeibo]; [self reloadStateWithType:ShareTypeSinaWeibo]; } -(IBAction)loginoutWithQQ:(id)sender{ [ShareSDK cancelAuthWithType:ShareTypeQQSpace]; [self reloadStateWithType:ShareTypeQQSpace]; } -(void)reloadStateWithType:(ShareType)type{ //现实授权信息,包括授权ID、授权有效期等。 //此处可以在用户进入应用的时候直接调用,如授权信息不为空且不过期可帮用户自动实现登录。 id<ISSPlatformCredential> credential = [ShareSDK getCredentialWithType:type]; UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"TEXT_TIPS", @"提示") message:[NSString stringWithFormat: @"uid = %@\ntoken = %@\nsecret = %@\n expired = %@\nextInfo = %@", [credential uid], [credential token], [credential secret], [credential expired], [credential extInfo]] delegate:nil cancelButtonTitle:NSLocalizedString(@"TEXT_KNOW", @"知道了") otherButtonTitles:nil]; [alertView show]; } //关注用户 -(IBAction)guanzhuUs:(id)sender{ [ShareSDK followUserWithType:ShareTypeSinaWeibo //平台类型 field:@"ShareSDK" //关注用户的名称或ID fieldType:SSUserFieldTypeName //字段类型,用于指定第二个参数是名称还是ID authOptions:nil //授权选项 viewDelegate:nil //授权视图委托 result:^(SSResponseState state, id<ISSPlatformUser> userInfo, id<ICMErrorInfo> error) { if (state == SSResponseStateSuccess) { NSLog(@"关注成功"); } else if (state == SSResponseStateFail) { NSLog(@"%@", [NSString stringWithFormat:@"关注失败:%@", error.errorDescription]); } }]; } @end 5)你可能会看到一些应用需要第三方登录的,一种是弹出webView加载的新浪微博或者qq的网页授权,还有一种是跳转到本地的已经安装的新浪微博应用或者qq应用进行授权。第二种授权方式较SSO授权,体验会比较好一些,因为不需要用户输入新浪微博或QQ的用户名与密码。 第二种授权方式需要在plist中配置Scheme。SSO默认是打开的不需要配置。在AppDelegate中实现回调。 DEMO下载地址:http://download.csdn.net/download/daleiwang/7734321 程序猿神奇的手,每时每刻,这双手都在改变着世界的交互方式! 本文转自当天真遇到现实博客园博客,原文链接:http://www.cnblogs.com/XYQ-208910/p/5144477.html ,如需转载请自行联系原作者

优秀的个人博客,低调大师

linux学习:持续集成篇--Maven私有库和本地库的安装与配置-03

如果构建的Maven 项目本地仓库没有对应的依赖包,那么就会去Nexus 私服去下载,那么如果Nexus 私服也没有此依赖包,就回去远程中央仓库下载依赖,Nexus 私服下载成功后再下载至本地Maven 库供项目引用。 maven私服器Sonatype Nexus的安装与配置 1、安装 1.1下载 Nexus(这里使用的是:nexus-2.11.2-03-bundle.tar.gz) http://www.sonatype.org/nexus/go/ 1.2解压:因为解压后有两个文件夹,所以这里新建了一个nexus文件夹 [root@localhostopt]#mkdirnexus [root@localhostopt]#tar-zxvf/opt/tar/nexus-2.11.2-03-bundle.tar.gz-C/opt/nexus/ [root@localhostopt]#cdnexus/ [root@localhostnexus]#ls nexus-2.11.2-03sonatype-work [root@localhostnexus]# (一个 nexus 服务,一个私有库目录) 1.3编辑 Nexus 的 nexus.properties 文件,配置端口和 work 目录信息(保留默认) [root@localhost conf]# cat nexus.properties #Jettysection application-port=8081 application-host=0.0.0.0 nexus-webapp=${bundleBasedir}/nexus nexus-webapp-context-path=/nexus #Nexussection nexus-work=${bundleBasedir}/../sonatype-work/nexus runtime=${bundleBasedir}/nexus/WEB-INF 1.4编辑 nexus 脚本 vi/opt/nexus/nexus-2.11.2-03/bin/nexus #改成root RUN_AS_USER=root 1.5启动 /opt/nexus/nexus-2.11.2-03/bin/nexusstart 1.6访问:http://192.168.175.9:8081/nexus 1.7登录,默认用户名 admin,默认密码 admin123 到此,Nexus 已安装完成,接下来是 Nexus 的配置 2、配置(登录后) 2.1 菜单 Administration/Server 配置邮箱服务地址(如果忘记密码,可以通过该邮箱找回密码) 测试邮箱: 给用户配置邮箱地址,方便忘记密码时找回: 2.2 修改密码 2.3 仓库 group仓库组: Nexus 通过仓库组的概念统一管理多个仓库,这样我们在项目中直接请求仓库组即可请求到仓库组管理的多个仓库 hosted宿主仓库: 主要用于发布内部项目构件或第三方的项目构件(如购买商业的构件)以及无法从公共仓库获取的构件(如 oracle 的 JDBC 驱动) proxy代理仓库: 代理公共的远程仓库; virtual虚拟仓库: 用于适配 Maven 1; 一般用到的仓库种类是 hosted、proxy。 Hosted仓库常用类型说明: releases:内部的模块中 release 模块的发布仓库 snapshots:发布内部的 SNAPSHOT 模块的仓库 3rd party:第三方依赖的仓库,这个数据通常是由内部人员自行下载之后发布上去 如果构建的Maven项目本地仓库没有对应的依赖包,那么就会去Nexus私服去下载,如果Nexus私服也没有此依赖包,就回去远程中央仓库下载依赖,这些中央仓库就是proxy 。Nexus私服下载成功后再下载至本地Maven库供项目引用。 设置proxy代理仓库(Apache Snapshots/Central/Codehaus Snapshots)准许远程下载: 注意:这里3个proxy都设置 setting.xml配置: <?xmlversion="1.0"encoding="UTF-8"?> <settingsxmlns="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.0http://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository>G:\workspace\maven_space</localRepository> <interactiveMode>true</interactiveMode> <offline>false</offline> <pluginGroups> </pluginGroups> <!--配置权限,使用默认用户--> <servers> <server> <id>nexus-releases</id> <username>deployment</username> <password>deployment123</password> </server> <server> <id>nexus-snapshots</id> <username>deployment</username> <password>deployment123</password> </server> </servers> <mirrors> </mirrors> <profiles> <profile> <id>edu</id> <activation> <activeByDefault>false</activeByDefault> <jdk>1.6</jdk> </activation> <repositories> <!--私有库地址 仓库组 --> <repository> <id>nexus</id> <url>http://192.168.175.9:8081/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <!--插件库地址--> <pluginRepository> <id>nexus</id> <url>http://192.168.175.9:8081/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <!--激活profile--> <activeProfiles> <activeProfile>edu</activeProfile> </activeProfiles> </settings> 项目的构建与发布:pom.xml <distributionManagement> <repository> <id>nexus-releases</id> <name>NexusReleaseRepository</name> <url>http://192.168.175.9:8081/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <id>nexus-snapshots</id> <name>NexusSnapshotRepository</name> <url>http://192.168.175.9:8081/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement> 发布到私有库: pom:<version>1.0-SNAPSHOT</version> pom:<version>1.0-RELEASES</version> 4、上传第三方jar,如:demo.jar 配置其开机启动 1、负责nexus到/etc/init.d下 cp/opt/nexus/nexus-2.11.2-03/bin/nexus/etc/init.d/nexus 2、修改nexus [root@localhost~]#vi/etc/init.d/nexus NEXUS_HOME="/opt/nexus/nexus-2.11.2-03/" 3、修改wrapper.conf [root@localhost~]#vi/opt/nexus/nexus-2.11.2-03/bin/jsw/conf/wrapper.conf wrapper.java.command=/home/jdk1.7.0_71/bin/java 4、添加脚本的可执行权限 chmod755/etc/init.d/nexus 5、添加为系统服务 chkconfig--addnexus

资源下载

更多资源
腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

用户登录
用户注册