本人敲的入門 代碼
http://git.oschina.net/gxgeek/springboot-elasticsearch
http://git.oschina.net/gxgeek/springboot-elasticsearch
2017-09-13
踩坑 經歷 之前沒有試過 SpringMVC的 PUT 方式 提交 今天跟老師敲發現 參數解析不了 解決方案 追加Filter 鏈 (SpringMVC 的解決方案) 在項目中加入 @Component public class PutFilter extends HttpPutFormContentFilter { } 然后PostMan 請求方式改成 x-www-form-urlencoded 不知道老師為什么 可以請求成功 好奇~~~~
2017-09-13
@qq_清風明月_94210669 這位同學果然是很認真很細心的^_^。在這里呢,我也推薦大家直接使用@RestController來替代@Controller和@ResponseBody的組合。另外,在實際工作環境中,我們也要靈活的應用這兩個注解,祝學習愉快!
2017-09-13
老師 可以 不用@ResponseBody 注解 因為 RestController 張這樣
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Controller
@ResponseBody
public @interface RestController {
String value() default "";
}
已經包含了
另外使用 RestController 想返回試圖 可以用 返回 ModelAndView 這個類
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Controller
@ResponseBody
public @interface RestController {
String value() default "";
}
已經包含了
另外使用 RestController 想返回試圖 可以用 返回 ModelAndView 這個類
2017-09-13
http://localhost:9200/_plugin/head/
http://localhost:9100/_plugin/head/
http://localhost:9100/_plugin/head/
appender.console.type = Console
appender.console.name = Console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%t] %-5p $c -%m%n
rootLogger.level = info
rootLogger.appenderRef.console.ref = console
appender.console.name = Console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%t] %-5p $c -%m%n
rootLogger.level = info
rootLogger.appenderRef.console.ref = console
2017-09-13