上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: (1)问:这里只讲一点,假如不需要SpringBoot自动配置,想关闭某一项自动配置,又该如何设置?(2)比如:此时你需要做一个短信验证码发送的微服务,但因为项目架构,不得已自动配置了数据源,此时需要去进行取消。(3)解决:使用主动类上@SpringBootApplication下的exclude参 阅读全文
posted @ 2024-02-01 11:07 予真 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2024-02-01 10:54 予真 阅读(1) 评论(0) 推荐(0) 编辑
摘要: @Import 注解是 Spring Framework 中的一个注解,用于在配置类中引入其他配置类或者普通的 Java 类。通过 @Import 注解,你可以将其他配置类或者普通类引入到当前的配置类中,从而实现配置的组合和模块化。 @Configuration @Import(OtherConfi 阅读全文
posted @ 2024-02-01 10:54 予真 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2024-02-01 10:40 予真 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2024-02-01 10:35 予真 阅读(1) 评论(0) 推荐(0) 编辑
摘要: META-INF/spring 目录通常用于存放 Spring 框架相关的配置文件。这个目录位于 Java 或 Spring 应用的类路径(classpath)中,使得 Spring 框架能够在应用启动时自动加载这些配置文件。在 Spring 应用中,META-INF/spring 目录可能包含以下 阅读全文
posted @ 2024-02-01 10:31 予真 阅读(643) 评论(0) 推荐(0) 编辑
摘要: @bean里面没有component @Bean 和 @Component 都是 Spring 框架中用于定义和注册 bean 的注解,但它们的使用场景和方式有所不同。 @Bean - @Bean 注解用在方法上,通常在配置类(带有 @Configuration 注解的类)中使用。- 它表示通过方法 阅读全文
posted @ 2024-02-01 10:18 予真 阅读(109) 评论(0) 推荐(0) 编辑
摘要: @controller @service @repository 下面都是@component注解 boolean proxyBeanMethods() default true; proxyBeanMethods 是 Spring Boot 中 @Configuration 注解的一个属性,用于控 阅读全文
posted @ 2024-02-01 10:16 予真 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 自动装配的流程(原理) 参考链接:https://blog.csdn.net/weixin_45764765/article/details/1102505311、main方法中SpringApplication.run(HelloBoot.class,args)的执行流程中有refreshCont 阅读全文
posted @ 2024-02-01 10:05 予真 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 是的,在 Java 的 Stream API 中,你可以在 filter 和 forEach 操作之间再次使用 filter。实际上,你可以根据需要链式调用多个中间操作(如 filter、map 等),但请注意,forEach 是一个终端操作,它会消费流并产生一个非流的结果。一旦调用了 forEac 阅读全文
posted @ 2024-02-01 09:02 予真 阅读(115) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 下一页