com.mycompany.daospring.StudentManager.java Source code

Java tutorial

Introduction

Here is the source code for com.mycompany.daospring.StudentManager.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.daospring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *
 * @author karthik
 */
public class StudentManager {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("SpringConfiguration.xml");
        Student s = (Student) context.getBean("student");
        System.out.println(s);
    }
}