碎片学习笔记

SpringCloud学习 开发阶段,用热部署Devtools,但是一旦上线,应该关掉热部署。 客户消费者端口:80端口(一般用户都是80端口)

Spring Annotations

@Autowired 1 2 3 4 5 6 @Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.ANNOTATION_TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Autowired { boolean required() default true; } @Autowired has a boolean argument called required with a default value of true. It tunes Spring’s behavior when it doesn’t find a suitable bean to wire. When true, an exception is thrown, otherwise, nothing is wired. @AliasFor 1 2 3 4 5 6 7 8 9 10