Demo entry 6783510



Submitted by anonymous on Feb 15, 2019 at 02:11
Language: Java. Code size: 474 Bytes.

package com.example.demo.config;

import com.example.demo.bean.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

public class MyAppConfiguration {

    @Bean  //将方法的返回值添加到容器中;容器中这个组件默认的id就是方法名
    public Student firstStudent(){
        Student student = new Student(    );
        return student;

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).