关键词:
1.
1、pom.xml中添加支持web的模块:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
pom.xml文件中默认有两个模块:
spring-boot-starter:核心模块,包括自动配置支持、日志和YAML;
spring-boot-starter-test:测试模块,包括JUnit、Hamcrest、Mockito。
2、编写controller内容
@RestController
public class HelloWorldController {
@RequestMapping("/hello")
public String index() {
return "Hello World";
}
}
@RestController的意思就是controller里面的方法都以json格式输出,不用再写什么jackjson配置的了!
3、启动主程序,打开浏览器访问http://localhost:8080/hello,就可以看到效果了,有木有很简单!
https://zhuanlan.zhihu.com/p/24957789
https://www.zhihu.com/question/53729800/answer/255785661
第26月第2天vimjavacomplete
1.将解压出来的autoload和doc的内容添加到~/.vim/下的相应目录下,如果~/.vim下没有这两个文件夹就手动创建其中autoload里的有javacomplete.vimjava_parser.vimReflection.java三个文件,要做的事情是编译:javacReflection.java得到一个.class文件将.clas... 查看详情
第9月第26天pairs和ipairs
1.a={ip="127.0.0.1",port=6789}fori,vinpairs(a)doprint(i,v)end a={1}fori,vinipairs(a)doprint(i,v)endhttp://blog.csdn.net/witch_soya/article/details/7556595 查看详情
第20月第29天cocoa抽象工厂(代码片段)
1.在CocoaTouch框架中,类簇是抽象工厂模式在iOS下的一种实现,以NSArray举例,将原有的alloc+init拆开写:idobj1=[NSArrayalloc];//__NSPlacehodlerArray*idobj2=[NSMutableArrayalloc];//__NSPlacehodlerArray*idobj3=[obj1init];//__NSArrayI*idobj4 查看详情
第25月第26天dispatch_group(代码片段)
1.dispatch_group_enter(group);dispatch_group_leave(group); dispatch_group_notify(group1,queue1,block);在这种组合下,根据任务是同步、异步又分为两种,这两种组合的执行代码与运行结果如下:第一种:同步任务时dispatch_queue_tqueue2=dispatch_queue_creat 查看详情
第19月第20天uitableview:改变tableheaderview的高度(代码片段)
1.UITableView:改变TableHeaderView的高度CGRectnewFrame=headerView.frame;newFrame.size.height=newFrame.size.height+webView.frame.size.height;headerView.frame=newFrame;[self.tableViewsetTableHeaderView:header 查看详情
第20月第22天2016计算机大会后记——机器学习:发展与未来
1.2016计算机大会后记——机器学习:发展与未来 http://www.cnblogs.com/winifred-tang94/p/6028487.html 40:00左右http://www.iqiyi.com/v_19rr9nbim0.html?dummy=&wx_uid1=wxidoG0a9jpBi8LndTiBR2JI2PlP1CPE& 查看详情
第9月第3天uilabelcontentscale
1. http://blog.csdn.net/u012703795/article/details/43706449 查看详情
第9月第30天mvp
1. importUIKitstructPerson{//ModelletfirstName:StringletlastName:String}protocolGreetingView:class{funcsetGreeting(greeting:String)}protocolGreetingViewPresenter{init(view:GreetingView,person:Per 查看详情
第16月第27天pipinstallvirtualenv
1.pipinstallvirtualenvvirtualenvtestvircdtestvircdScriptsactivatepipinstalldjango==1.9.8 https://zhuanlan.zhihu.com/p/32286726 查看详情
第2月第24天coretext行高
1.NSMutableAttributedString 行高 NSMutableAttributedString*attributedString=[[NSMutableAttributedStringalloc]initWithString:labelText];NSMutableParagraphStyle*paragraphStyle=[[NSMutableParagra 查看详情
第10月第28天touchesbegan
1.-(void)touchesBegan:(NSSet*)toucheswithEvent:(UIEvent*)event{[[selfnextResponder]touchesBegan:toucheswithEvent:event];[supertouchesBegan:toucheswithEvent:event];}-(void)touchesMoved:(NSSet*)touchesw 查看详情
第37月第29天avplayer截屏
1.-(void)displayLinkCallback:(CADisplayLink*)sender{CMTimetime=[snapshotOutputitemTimeForHostTime:CACurrentMediaTime()];if([snapshotOutputhasNewPixelBufferForItemTime:time]){lastSnapshotPixelBuffer=[s 查看详情
第5月第18天视频编辑水印
1.//***********ForASpecialTimeCABasicAnimation*animation=[CABasicAnimationanimationWithKeyPath:@"opacity"];[animationsetDuration:0];[animationsetFromValue:[NSNumbernumberWithFloat:1.0]];[animationsetT 查看详情
第16月第3天afurlsessionmanager
1. -(AFURLSessionManagerTaskDelegate*)delegateForTask:(NSURLSessionTask*)task{ NSParameterAssert(task); AFURLSessionManagerTaskDelegate*delegate=nil; [self. 查看详情
第25月第11天deeplearning.ai
1.网易云课堂深度学习工程师点击进入课程地址(英文)(收费)点击进入课程地址(中文)(免费)第一门神经网络和深度学习第二门改善神经网络第三门结构化机器学习项目第四门卷积神经网络第五门序列模型 查看详情
第11月第14天openglyuv
1.Hereissomesnippetsofcodefrommyproject‘movieplayerforiOS‘.1.fragmentshadervaryinghighpvec2v_texcoord;uniformsampler2Ds_texture_y;uniformsampler2Ds_texture_u;uniformsampler2Ds_texture_v;voidmain(){hig 查看详情
第5月第6天nsoperationisconcurrent
1. @implementationAFURLConnectionOperation...-(BOOL)isConcurrent{returnYES;} NSOperation调用start方法即可开始执行操作,NSOperation对象默认按同步方式执行,也就是在调用start方法的那个线程中直接执行。NSOperation对象的isConcurrent方法会告诉我... 查看详情
第9月第5天avvideoaveragebitratekey
1.https://stackoverflow.com/questions/11751883/how-can-i-reduce-the-file-size-of-a-video-created-with-uiimagepickercontroller http://www.jianshu.com/p/61a9030adeef 查看详情