第26月第20天 springboot
---------------------
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
------------------------
1.
修改IEDA设置
打开 Settings --> Build-Execution-Deployment --> Compiler,将 Build project automatically.勾上。
点击 Help --> Find Action..,或使用快捷键 Ctrl+Shift+A来打开 Registry...,将 其中的compiler.automake.allow.when.app.running勾上。
https://1few.com/spring-boot-hot-swap/#more-238
第26月第20天 springboot的更多相关文章
- 腾讯云 CIF 工程效能峰会,10 月 19 - 20 日震撼来袭!
近年来,依托于云计算的飞速发展,腾讯云云产品更新迅猛,云原生生态构建初具规模,越来越多的企业也开始寻求与深入数字化转型之路.但在摸索与实践中,企业往往会进入"伪上云"的误区.除了单 ...
- 第26月第30天 srt
1. ffmpeg -i 0.mp4 -vf subtitles=0.srt 1.mp4 https://jingyan.baidu.com/article/c45ad29c73cef2051653e ...
- 第26月第29天 ffmpeg yasm
1. brew install automake fdk-aac git lame libass libtool libvorbis libvpx \ opus sdl shtool texi2htm ...
- 第26月第28天 avplayer cache
1.urlsession https - (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticati ...
- 第26月第26天 Domain=AVFoundationErrorDomain Code=-11850
1. curl -voa http://119.29.108.104:8080/inweb01/kotlin.mp4 -H "Range:bytes=0-1" https://al ...
- 第26月第25天 ubuntu openjdk-8-jdk jretty
1.ubuntu ============== sudo apt-get install openjdk-8-jdk https://blog.csdn.net/zhaohaiyitian88/art ...
- 第26月第23天 nsobject 单例 CFAbsoluteTimeGetCurrent
1.nsobject 单例 sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/ ...
- 第26月第22天 iOS瘦身之armv7 armv7s arm64选用 iOS crash
1.iOS瘦身之armv7 armv7s arm64选用 机器对指令集的支持是向下兼容的,因此armv7的指令集是可以运行在iphone5S以上的,只是效率没那么高而已~ 但是由于苹果要求必须支持ar ...
- 第26月第18天 mybatis_spring_mvc
1. applicationContext.xml 配置文件里最主要的配置: <?xml version="1.0" encoding="utf-8"? ...
随机推荐
- js jquery 遍历 for,while,each,map,grep
js jquery 遍历 一,for循环. // 第一种var arr = [1, 2, 3];for(var i = 0; i < arr.length; i++) { console.log ...
- 【洛谷P4145】花神游历各国
题目大意:给定一个长度为 N 的序列,支持区间开根,区间求和. 题解:对于区间开根操作,可以发现任何一个位置的值开根至多 6 次就会变成 1.因此即使是整个区间开根,暴力修改6次后,所有的点的权值均小 ...
- JS事件(三)部分常用事件
1.滚动条事件scroll EventUtil.addHandler(window,"scroll",function(event){ if(document.compatMode ...
- (链表 双指针) leetcode 141. Linked List Cycle
Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked lis ...
- (贪心 优先队列)P1090合并果子 洛谷
题目描述 在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆.多多决定把所有的果子合成一堆. 每一次合并,多多可以把两堆果子合并到一起,消耗的体力等于两堆果子的重量之和.可 ...
- ajax 小练习
<!DOCTYPE html> <html lang="zh-cn"> <head> <meta http-equiv="Con ...
- day14-jdbc案例(简单的curd&分页)
回顾: mvc jsp的设计模式1: jsp+javabean jsp的设计模式2: jsp+javabean+servlet jsp:展示数据 javabean:封装数据 封装对数据的访问 serv ...
- django_orm查询性能优化
查询操作和性能优化 1.基本操作 增 models.Tb1.objects.create(c1='xx', c2='oo') 增加一条数据,可以接受字典类型数据 **kwargs obj = mode ...
- CodeForces920E 链表强优化BFS
http://codeforces.com/problemset/problem/920/E 题意:求一个图的补图的连通分量个数以及每个连通分量里的点个数 如果这不是一个补图,BFS或者并查集可过,但 ...
- spring中IOC和AOP原理
IoC(Inversion of Control): (1)IoC(Inversion of Control)是指容器控制程序对象之间的关系,而不是传统实现中,由程序代码直接操控.控制权由应用代码中转 ...