标题

IOC控制反转

依赖注入

1 构造器注入
2 setter方法注入

@Autowired

@Autowired相当于<property name = “dog” value =“dog”

@Autowired ,它可以对类成员变量、方法及构造函数进行标注,完成自动装配的工作。 通过 @Autowired的使用来消除 set ,get方法。

@Qualifier

@Component

@Repository (dao层)

@Service (service层)

@Controller (controller层)

Spring AOP

面向切面编程

提供声明式事务

@Aspect

@Before
@After
@Around

@Bean

Spring中@Component与@Bean的区别

@Component和@Bean的目的是一样的,都是注册bean到Spring容器中。

@Component VS @Bean

@Component 和 它的子类型(@Controller, @Service and @Repository)注释在类上。告诉Spring,我是一个bean,通过类路径扫描自动检测并注入到Spring容器中。
  @Bean不能注释在类上,只能用于在配置类中显式声明单个bean。意思就是,我要获取这个bean的时候,spring要按照这种方式去获取这个bean。默认情况下@Bean注释的方法名作为对象的名字,也可以用name属性定义对象的名字。

@RequestMapping

@GetMapping(value=““)

@Configuration

JSON
Jackson使用需要在pom.xml中导入依赖

@ResponseBody

@RequestController

@RestController注解来控制处理Http请求

配合@RequestMapping 配置url映射使用。

1.@RestController注解是@Controller和@RequestBody的组合使用

thymeleaf模板引擎

thymeleaf和Vue

前后端不分离:用thymeleaf做模板引擎,做数据渲染
前后端分离:使用vue、react等
vue前端开发框架

本文地址:https://blog.csdn.net/hessenberg/article/details/114251896