Spring Alone's Spring Example (IOC)

zhaozj2021-02-16  73

REFERENCE:

1. 60 seconds entry tutorial: http://gabriel.jarchitect.org/spring/index.html

The required JAR file includes: Spring-core.jar, common-logging.jar, in the IDEA, the directory running the Java virtual machine is not a classes directory, so it can't find the "bean.xml" file in the current directory, use the following Code:

Import org.springframework.core.io. *;

/ * Read the configuration file from classpath * / resource res = new classpathresource ("bean.xml"); xmlbeanfactory factory = new xmlbeanfactory (res);

转载请注明原文地址:https://www.9cbs.com/read-12405.html

New Post(0)