You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
866 B
37 lines
866 B
package cc.bnblogs.beanstudy.bean; |
|
|
|
import cc.bnblogs.beanstudy.entity.Bird; |
|
import cc.bnblogs.beanstudy.entity.Fish; |
|
import cc.bnblogs.beanstudy.entity.User; |
|
import org.springframework.context.annotation.Bean; |
|
import org.springframework.context.annotation.Configuration; |
|
import org.springframework.context.annotation.Scope; |
|
|
|
/** |
|
* @description: |
|
* @author: zfp@bnblogs.cc |
|
* @date: 2023/3/28 23:04 |
|
*/ |
|
@Configuration |
|
public class WebConfig { |
|
// @Bean(initMethod = "init",destroyMethod = "destroy") |
|
//// @Scope(value = "prototype") |
|
// public User user() { |
|
// return new User(); |
|
// } |
|
|
|
@Bean |
|
public Bird bird() { |
|
return new Bird(); |
|
} |
|
|
|
@Bean |
|
public Fish fish() { |
|
return new Fish(); |
|
} |
|
|
|
// @Bean |
|
// public MyBeanPostProcessor myBeanPostProcessor () { |
|
// return new MyBeanPostProcessor(); |
|
// } |
|
}
|
|
|