- 博客(69)
- 资源 (5)
- 收藏
- 关注
原创 springcloud gateway GlobalFilter 签名校验,获取Post请求体
前言网上有很多方式获取Post请求内容,尝试了好多种方式,都不是最佳的使用方式。方式一网上大多的解决方会有很多坑,网上说最大只能1024B(点击快速传送),个人没有采用if ("POST".equals(method)) { //从请求里获取Post请求体 String bodyStr = resolveBodyFromRequest(serverHttpReq...
2020-01-08 10:08:31
9965
7
原创 正则表达式获取Maven依赖中的groupId
用余打包时剔除第三方jar包mvn dependency:tree | grep '[\W\w]*:[a-zA-Z0-9_\.-]*:[a-zA-Z0-9]*:[a-zA-Z0-9\.-]*:[a-zA-Z0-9]*' | sed 's/\[INFO\] //g' | sed 's/+- //g' | sed 's/| //g' | sed 's/\\- //g' | sed 's/ //g'...
2019-11-21 16:48:21
1377
原创 Spring boot 多数据源配置(Mybatics+JPA)
Spring boot 配置数据源spring: mvc: favicon: enabled: false datasource: primary: username: root password: root jdbc-url: mysql://127.0.0.1:3306/a?useUnicode=true d...
2019-09-21 14:56:45
379
1
原创 User Notifications Framework in iOS 10
效果图 UserNotificationsUI,iOS 10增加新的framework可以让我们定义新的通知样式。使用步骤:1、创建一个Request(UNNotificationRequest),主要是为了请求通知中心发送通知。2、Request 包含一个触发器和内容。触发器trigg
2016-10-12 18:45:31
1087
原创 ios DatePicker 自定义,参考他人代码,整理...优化, 循环滑动scrollview
自定义ios系统空间,UIDatePicker,单独循环滑动...一下是代码....代码注释很详细,不多讲...1. 循环滑动scrollview//// CycleScrollView.h// DatePickerScroll//// Created by lance on 14/12/8.// Copyright (c) 2014年 Lance. All righ
2014-12-09 17:58:57
1985
1
原创 iOS自定义日期picker选择器,参考他人代码...
类似于ios系统自带的日期选择器...循环滑动类...//// MXSCycleScrollView.h// xuexin// e-mail:rbyyy924805@163.com// Created by renbing on 3/7/14.// Copyright (c) 2014 renbing. All rights reserved.//#imp
2014-12-05 15:47:37
1928
原创 UiviewController 自定义present 动画 UIViewControllerAnimatedTransitioning
UIviewController 自定义present don
2014-11-24 17:21:49
1365
原创 AFNetWorking封装使用
//// NetworkingOperation.m// AFHttpLearn//// Created by lance on 14-9-30.// Copyright (c) 2014年 Lance. All rights reserved.//#import "NetworkingOperation.h"#import "AFHTTPRequestOperation
2014-10-09 14:19:18
988
原创 ios 动画 彩图
//// ColorView.m// MulticolorLayerDemo//// Created by lance on 14-8-1.// Copyright (c) 2014年 Liuyu. All rights reserved.//#import "ColorView.h"@implementation ColorView+ (Class)layerCl
2014-08-01 11:27:07
670
原创 打转显示
//// CircularProgressView.h// TestProject//// Created by lance on 14-5-13.// Copyright (c) 2014年 Lance. All rights reserved.//#import @interface CircularProgressView : UIView{ BOOL
2014-05-30 09:50:11
666
原创 工具others
+ (void)setExtraCellLineHidden:(UITableView *)tableView{ UIView *view = [[UIView alloc] init]; view.backgroundColor = [UIColor clearColor]; [tableView setTableFooterView:view];}+ (void
2014-05-30 09:48:16
678
原创 工具1
+ (NSString *)dealString:(NSString *)string{ NSString *returnString = @""; if (string) { if ([string isKindOfClass:[NSString class]]) { if (string.length > 0 && ![string i
2014-05-30 09:46:13
608
原创 iOS 截图
- (UIImage *)captureScreenWithSize:(CGRect )rect{ UIImage *image = nil; // 截图 UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow; UIGraphicsBeginImageContext(rect.size)
2014-05-30 09:43:40
661
原创 菜单,圆周菜单 动画效果
//// CicleMenu.h// Learn3//// Created by lance on 14-4-10.// Copyright (c) 2014年 Lance. All rights reserved.//#import @protocol cicleMenuDelegate;@interface CicleMenu : UIView{ UI
2014-04-10 18:17:08
811
原创 GCD
dispatch_queue_t concurrentQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_async(concurrentQueue, ^{ __block UIImage *image = nil; dispatch_sync(con
2014-02-28 11:24:30
662
原创 压缩图片
//压缩分享图片 UIImage *oriImage = _placeImv.image; CGFloat defaultWidth = 120.0; if (oriImage.size.width > defaultWidth || oriImage.size.height > defaultWidth) { CGSize newSize;
2014-02-10 09:32:24
837
原创 动态调用方法Use the NSInvocation class
Use the NSInvocationclass, like so:- (NSString *) myMethod:(NSString *)param1withParam2:(NSNumber *)param2{NSString *result = @"Objective-C";NSLog(@"Param 1 = %@", param1);NSLog(@"Param 2
2014-01-22 11:25:01
696
原创 UIPickerView + UIToolsBar
//// PickerView.h// PickerViewTest//// Created by lance on 14-1-10.// Copyright (c) 2014年 Lance. All rights reserved.////// PickerView.m// PickerViewTest//// Created by lance on 14-1
2014-01-10 18:16:51
660
原创 UInavigationBar 颜色修改
self.navigationController.navigationBar.barTintColor = [UIColor blackColor];self.navigationController.navigationBar.tintColor = [UIColor whiteColor];[self.navigationController.navigationBar setTitle
2014-01-03 17:45:19
750
原创 CoreData
//// AppDelegate.m// CoreDataLearnByCode//// Created by lance on 13-12-31.// Copyright (c) 2013年 Lance. All rights reserved.//#import "AppDelegate.h"#import "ProfessionViewController.h"@
2013-12-31 15:54:39
598
原创 NSUserDefault
- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. [_activitySwitch addTarget:self action:@selector(toggleActivity:) forContro
2013-12-31 13:51:52
712
原创 PLSqliteDatabase
#import "DataBase.h"#import static PLSqliteDatabase * dbPointer;@implementation DataBase//单例+ (PLSqliteDatabase *) setup{ if (dbPointer) { return dbPointer; } NSLog(@"%@",NSSearchPath
2013-12-30 15:25:14
785
原创 map
- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. if ([CLLocationManager locationServicesEnabled]) { _mapView.delegat
2013-12-27 16:48:06
697
原创 总结 1
当前状态栏[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque;设置keywindow 的view ,可以放在全部view的最上层,不会被其他view填充[[UIApplication sharedApplication].keyWindow addSubview:_nav.view];
2013-12-19 10:01:50
754
原创 UITableview 单选
摘录自《iPhone3开发基础教程》第202页:#pragma mark -#pragma mark Table Delegate Methods- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ int newRow = [indexPa
2013-12-10 13:56:19
724
原创 分享界面
#import @class ButtonView;@class ShareActivityView;typedef void (^ButtonViewHandler)(ButtonView *buttonView);@interface ShareActivityView : UIView//背景颜色, 默认是透明度0.95的白色@property (nonatomic, str
2013-12-10 11:50:59
1157
原创 UIWebView计算高度
第一种:- (void)webViewDidFinishLoad:(UIWebView *)webView{ float height = [[webView stringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight;"] floatValue]; //document.body.scrollH
2013-12-09 14:07:06
851
原创 sqlite
基本#import "UserDB.h"#import @implementation UserDB- (void)queryTable{ sqlite3 *sqlite = nil; NSString *filePath = [NSHomeDirectory() stringByAppendingFormat:@"/Documents/data.sqlite"];
2013-11-29 13:12:50
966
原创 文件下载 监听网络
#import "ViewController.h"#import "WebImageView.h"#import "ASIHTTPRequest.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; // Do
2013-11-28 18:16:21
823
原创 使用ASIHTTPRequest 网络连接
#import #import "ASIHTTPRequest.h"@interface WebImageView : UIImageView - (void)setImageURL:(NSURL *)url;@end#import "WebImageView.h"#import "ASIHTTPRequest.h"#import "ASIFormDataRequest.h"
2013-11-28 17:36:07
900
原创 封装网络请求
xml和jsonxml:两种解析方式 dom 和 sax dom 把整个数据一次性读入内存,功耗大,解析难度低sax 逐步解析,内存小,相对麻烦json相对好点。#import typedef void (^FinishConnection)(NSData *data);@interface WXRequest : NSMutableURLReques
2013-11-28 16:06:59
682
原创 网络多线程 异步 同步处理
#import "UIImageView+WebCatch.h"@implementation UIImageView (WebCatch)- (void)setImageWithURL:(NSURL *)url{// dispatch_queue_t queue = dispatch_queue_create("loadImage", nil);// dispatch_
2013-11-28 14:59:42
809
原创 多线程 异步处理
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autore
2013-11-28 14:12:50
867
原创 视频播放 MPMoViewPlayerController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initializati
2013-11-28 11:37:10
1022
原创 后台程序
#import "AppDelegate.h"#import "ViewController.h"@implementation AppDelegate- (void)dealloc{ [_window release]; [_viewController release]; [super dealloc];}- (BOOL)application:(U
2013-11-28 11:00:51
651
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人