摘要:
SwaggerAPI框架 1.配置 导入pom.xml <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui --> <dependency> <groupId>io.springfox</groupId> 阅读全文
posted @ 2021-09-30 20:20
1_f
阅读(20)
评论(0)
推荐(0)
摘要:
3. @Component 介绍: 是spring中的一个注解,它的作用就是实现bean的注入,注解的本质就是一个类,可以代替xml配置文件的 web开发,提供三个@Component注解的衍生注解 @Repository(“名称”):dao层 @Service(“名称”):service层 @Co 阅读全文
posted @ 2021-09-30 11:44
1_f
阅读(18)
评论(0)
推荐(0)
摘要:
2. Configuration 介绍: @configuration用于定义配置类,可替换xml配置文件,被注解的类的内部包含一个或者多个@bean的注解的方法,这些方法会被AnnotationConfigApplicationContext或者AnnotationConfigWebApplica 阅读全文
posted @ 2021-09-30 11:27
1_f
阅读(60)
评论(0)
推荐(0)
摘要:
1. @Bean 介绍 : 是一个方法级别上的注解,主要用在@Configuration注解的类里,也可以用在@Component注解的类里,添加的bean的id为方法名 定义Bean 下面是一个例子 @Configuration public class AppConfig { @Bean pub 阅读全文
posted @ 2021-09-30 11:08
1_f
阅读(39)
评论(0)
推荐(0)

浙公网安备 33010602011771号