# 呵呵,Java注解以@为标识....看到@,当你展开想像,它像不像一朵花呢,一朵朵花呢
# 在Java的世界里,发展到今天,就像天女散花一般,到处都 @,好多好多的 @ 噢
■■ JavaSE
■□ Java注解
■ Java常用注解
- @Override
- @SuppressWarnings
- @Deprecated
- @FunctionalInterface
■ 元注解
- @Target
- @Retention
- @Documented
- @Inherited
- @
■ 其它
- @SafeVarargs
- @Repeatable
■□ 单元测试JUnit
■ JUnit常用注解
- @Before
- @After
- @Test
■ JUnit次常用注解
- @Ignore
- @BeforeClass
- @AfterClass
- @RunWith(Parameterized.class)
- @Parameters 加在静态方法上
■ JUnit其他注解
- @DisplayName
- @BeforeEach
- @AfterEach
- @BeforeAll
- @AfterAll
- @RepeatedTest
- @Timeout
- @Disabled
- @
■□ Lombok
■ 常用注解
- @Data
- @Getter
- @Setter
- @Sfl4j
■ 次常用注解
- @AllArgsConstructor
- @NoArgsConstructor
- @RequiredArgsConstructor
- @ToString
- @NotNull
■ 其他注解
- @EqualsAndHashCode
■■ JavaWeb
■□ Java Web 3.0
■ 常用注解
- @WebServlet
- @WebFilter
- @WebListener
■□ JSON交互:Jackson
■ 常用注解
- @JsonFormat
- @JsonIgnore
■■ JavaEE
■□ Struts2
■ struts2四大常用注解
- @ParentPackage("struts-default")
- @Namespace("/")
- @Action(value=,results={})
- @Result(name=,type=,location=)
■□ Hibernate(JPA)
■ 类上注解
- @Entity
- @Table(name=)
- @
■ 属性上注解:基本注解
- @Id
- @GeneratedValue
- @Column(property=)
- @Transient
- @IdClass
- @Basic
- @Enumerated
■ 属性上注解:关联注解
- @OneToOne
- @OneToManany
- @ManyToOne
- @ManyToMany
- @
■□ Spring
■ Ioc
- @Component
- @Constroller
- @Service
- @Repository
- @Value
- @Autowired
- @Qualifier
- @Resource
- @PostConstruct
- @PreDestory
- @Scope
■ 整合测试
- @ContextConfiguration("classpath:applicationContext.xml")
- @RunWith(value=SpringJUnit4ClassRunner.class)
- @
■ AOP
- @Aspect
- @Before
- @AfterReturning
- @AfterThrowing
- @After
- @Around
- @Pointcut
- @Component
■ 配置类
- @Configuration
- @ComponentScan(basePackage="com.xxx")
- @PropertySource(value="classpath:db.properties")
- @Import(value={DataSourceConfig.class})
- @Bean
■ 事务
- @Transactional
■ 其它:SpringMVC相关
- 参见springmvc部分
■□ Mybatis
■ CRUD基本操作
- @Select
- @Insert
- @Update
- @Delete
- @Param
■ 结果映射与多表查询
- @Results
- @Result
- @One
- @Many
■ 二级缓存
- @CacheNamespace(blocking=true)
■ 动态SQL
- @SelectProvider
- @InsertProvider
- @UpdateProvider
- @DeleteProvider
■ 其它
- @
■□ SpringMVC
■ 常用注解
- @RestController
- @RequestMapping
- @GetMapping
- @PostMapping
- @RequestParam
- @Validated
- @Valid
- @Size @NotNull @NotBlank ...
- @ModelAttribute("key")
- @RequestBody
- @ResponseBody
- @PathVariable
■ 其它:校验相关
- @Null
- @NotNull
- @Min
- @Max
- @Length
- @NotEmpty
- @Pattern
- @Range
- @AssertTrue
- @AssertFalse
- @
■ 其它:Others
- @Null
- @NotNull
- @Min
- @Max
■□ Shiro
■ C
- @S
- @
■
- @C
■ 其它
- @
■■ 分布式&面向服务:SOA&微服务&服务网格
■□ Web Services:CXF
■ 常用注解
- @WebService
- @WebMethod
■ 其他注解
- @Oneway
- @WebParam
- @WebResult
- @
■□ SpringBoot
■ 常用注解
- @SpringBootApplication
- @SpringBootConfiguration
- @ComponentScan
- @EnableAutoConfiguration
- @Configuration
- @PropertySource("classpath:jdbc.properties")
- @Bean
- @Value
- @EnableConfigurationProperties("JdbcProperties.class")
- @ConfigurationProperties(prefix="jdbc")
■ 整合测试
- @RunWith(SpringRunner.class)
- @SpringBootTest(classes=)
■ 组合注解
- @SpringBootApplication
- = @SpringBootConfiguration + @ComponentScan + @EnableAutoConfiguration
- @
■ 其他注解
- @MapperScan("com.xxx.ms.pojo")
■□ Spring Cloud(Netflix)
■ Eureka
- @EnableEurekaServer
- @EnableEurekaClient
- @EnableDiscoveryClient
■ Ribbon
- @LoadBalanced
■ Hystrix
- @EnableCircuitBreaker
- @HystrixCommand
- @DefaultProperties
■ Feign
- @EnableFeignClients
- @FeignClient
■ Zuul
- @EnableZuulProxy
■ 其它
- 组合注解:@SpringCloudApplication
- = @SpringBootApplication + @EnableDiscoveryClient + @EnableCircuitBreaker
■□ Spring Cloud Alibaba
■
- @P