Home > other >  Springboot annotations in plain/vanilla java
Springboot annotations in plain/vanilla java

Time:06-12

Can I use springboot annotations like @Bean, @Component, @Autowired etc in plain java project with just using gradle dependencies?

CodePudding user response:

To use spring frameworks annotations the project should be either spring boot or a project with all the required spring dependencies to support the above mentioned annotations.

CodePudding user response:

No. Spring uses those annotations for the inversion of control. Without this framework they are useless in plain java.

  • Related