springapp-servlet.xml.svn-base

来自「这个是我做j2ee培训的一个spring mvc的例子」· SVN-BASE 代码 · 共 50 行

SVN-BASE
50
字号
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

	<!--  - Application context definition for "springapp" DispatcherServlet.  -->

	<bean id="helloController"
		class="org.hyq.springapp.spring.controller.HelloController">
	</bean>

	<bean id="dataSource"
		class="org.springframework.jdbc.datasource.DriverManagerDataSource">
		<property name="driverClassName">
			<value>com.mysql.jdbc.Driver</value>
		</property>
		<property name="url">
			<value>jdbc:mysql://127.0.0.1:3306/test</value>
		</property>
		<property name="username">
			<value>root</value>
		</property>
		<property name="password">
			<value></value>
		</property>
	</bean>

	<bean id="prodManDao"
		class="org.hyq.springapp.db.jdbc.ProductManagerDaoJdbc">
		<property name="dataSource">
			<ref bean="dataSource" />
		</property>
	</bean>

	<!-- 瑙嗗浘瑙f瀽鍣ㄧ殑閰嶇疆 -->
	<bean id="viewResolver"
		class="org.springframework.web.servlet.view.InternalResourceViewResolver">
		<property name="viewClass">
			<value>org.springframework.web.servlet.view.JstlView</value>
		</property>
		<property name="prefix">
			<value>/WEB-INF/jsp/</value>
		</property>
		<property name="suffix">
			<value>.jsp</value>
		</property>
	</bean>

	<!-- 璧勬簮鏂囦欢瑙f瀽鍣

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?