首页>代码>Spring Bean的Scopes范围Singleton和Prototype说明>/spring-bean-scope-singleton/src/main/java/com/memorynotfound/spring/core/scope/CoffeeMachine.java
package com.memorynotfound.spring.core.scope;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
@Scope("prototype")
public class CoffeeMachine {

    private long serialNr;

    private String name;

    public long getSerialNr() {
        return serialNr;
    }

    public void setSerialNr(long serialNr) {
        this.serialNr = serialNr;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
最近下载更多
最近浏览更多
微信网友_6040315240812544  LV8 2022年10月27日
最代码-宋家辉  LV61 2021年11月11日
xiao菜  LV2 2021年6月2日
sizeking  LV8 2021年4月12日
骑着鱼儿过海的猫  LV1 2021年2月25日
酷酷的浩浩  LV3 2021年2月23日
lris_luanling  LV11 2021年2月22日
tangang  LV4 2021年2月22日
用户名已经存在了啊  LV2 2021年2月20日
lryepoch  LV7 2021年2月20日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友