前些天發現了一個巨牛的人工智能學習網站,通俗易懂,風趣幽默,忍不住分享一下給大家。點擊跳轉到教程。
PS:springcloud系列文章見:springcloud 系列,一看就會?。
在此,只是記錄細碎知識點。
?
1.? 簡化注解的使用:@PostMapping? ? @PutMapping? ?@DeleteMapping? ?@PatchMapping 、@GetMapping
@GetMapping("/seeName")
此注解等價于:
@RequestMapping(value = "/seeName", method = RequestMethod.GET)
用法如:
?
2.@Bean? 是一個方法注解。實例化一個Bean,并以該方法的名稱命名。如:
import org.springframework.context.annotation.Bean;
...@Beanpublic RestTemplate restTemplate(){return new RestTemplate();}
等價于:
RestTemplate restTemplate = new RestTemplate();
3.?
未完,待更新...?
?
?
?
?
?