Home  >  Article  >  Java  >  How to use @Configuration and @bean annotations in Springboot

How to use @Configuration and @bean annotations in Springboot

PHPz
PHPzforward
2023-05-12 14:46:13842browse

@Configuration annotation can achieve the effect of using xml configuration files in Spring

@Bean is equivalent to

in the xml configuration file In the spring project, we integrate third-party frameworks such as shiro and configure them in the spring. The role of using xml configuration files in Spring.

@Bean is equivalent to

in the xml configuration file

The above is the detailed content of How to use @Configuration and @bean annotations in Springboot. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete