Java 仅仅创建bean依赖于哪个spring工件?
我的项目中的一些较小的模块只创建一个配置类并公开一些bean。 对Spring类的依赖实际上只是Java 仅仅创建bean依赖于哪个spring工件?,java,spring,maven,spring-mvc,Java,Spring,Maven,Spring Mvc,我的项目中的一些较小的模块只创建一个配置类并公开一些bean。 对Spring类的依赖实际上只是@Bean,@Autowired,@Configuration,@Service 当前在我的gradle文件中,要包含这些依赖项,我需要: compile "org.springframework:spring-webmvc:$springVersion" 这显然会带来大量不需要的东西 我应该依靠什么工件来拉入最少量的库来满足上述对4个类的依赖?您将需要spring core、spring cont
@Bean
,@Autowired
,@Configuration
,@Service
当前在我的gradle文件中,要包含这些依赖项,我需要:
compile "org.springframework:spring-webmvc:$springVersion"
这显然会带来大量不需要的东西
我应该依靠什么工件来拉入最少量的库来满足上述对4个类的依赖?您将需要
spring core
、spring context
和spring beans
(它们也依赖于其他库)
应该把你需要的东西都放进去