SSH:dataSource配置问题
applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd"
xmlns:tx="http://www.springframework.org/schema/tx">
<aop:config></aop:config>
<!-- 打开自动装配 -->
<context:annotation-config></context:annotation-config> <bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="com.mysql.jdbc.Driver">
</property>
<property name="url"
value="jdbc:mysql://localhost:3306/mas?characterEncoding=UTF-8">
</property>
<property name="username" value="root"></property>
<property name="password" value="root"></property>
</bean>
hibernate.cfg.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory>
<mapping resource="cn/edu/nwsuaf/bean/Mas.hbm.xml" />
<mapping resource="cn/edu/nwsuaf/bean/Course.hbm.xml" />
<mapping resource="cn/edu/nwsuaf/bean/Teachingplanchange.hbm.xml" />
<mapping resource="cn/edu/nwsuaf/bean/Highleveltalent.hbm.xml" />
<mapping resource="cn/edu/nwsuaf/bean/Academicdegree.hbm.xml" />
<mapping
数据源只能在一个配置文件中配置:applicationContext.xml或者hibernate.cfg.xml。
SSH:dataSource配置问题的更多相关文章
- SSH免密登录的错误
为了避免每次在测试环境启动hadoop都需要输入密码, 使用免密操作 ssh-keygen,然后一直按enter键 接着需要输入root密码, 输入root密码后一直报错,密码不正确, permiss ...
- 欧拉系统-登陆 SSH 出现 Access Denied 错误
1./home 权限问题如果 /home 只支持 root 访问,那么不妨试一下 /tmp ,然后用 mv 命令再转移 2./etc/ssh/sshd_config 配置问题 vi /etc ...
- Linxu SSH登陆出现Access Denied错误的解决方法
其实这个问题是从 SCP 过来的.用 SCP 在两台 Linux 服务器之间传送备份文件.输入完 root 密码后,总是出现 Permission denied, please try again. ...
- Nagios学习实践系列——配置研究[监控当前服务器]
其实上篇Nagios学习实践系列——基本安装篇只是安装了Nagios基本组件,虽然能够打开主页,但是如果不配置相关配置文件文件,那么左边菜单很多页面都打不开,相当于只是一个空壳子.接下来,我们来学习研 ...
- vmware在桥接模式下配置centos7网络,并使用xshell连接虚拟主机(总结篇)
虚拟机系统:centos7 mini版本 1.虚拟安装成功之后,首先我配置的是桥接模式,因为我使用的是网线,配置完桥接模式之后我的linux虚拟机就可以访问网络了 2.因为我安装的是centos7的迷 ...
- mac机器下远程仓库添加完毕之后,却无法上传应有的内容。
Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you ha ...
- Nagios学习实践系列
其实上篇Nagios学习实践系列--基本安装篇只是安装了Nagios基本组件,虽然能够打开主页,但是如果不配置相关配置文件文件,那么左边菜单很多页面都打不开,相当于只是一个空壳子.接下来,我们来学习研 ...
- SQL语句在数据库中可以执行在mybatis执行不了
这个问题竟然纠结了半个小时! 就问题而言,肯定是出在mybatis中 终于,找到了答案, 原来是DataSource配置问题, 我将配置连接池的数据写到了文件db.properties中, SqlMa ...
- gogs仓库管理软件 exec: "git-upload-pack": executable file not found in $PATH
当配置完个人中心的ssh公钥的时候,在客户端拉取代码的时候,提示如下错误: Cloning into 'comix-b2m'... Gogs: Internal error fatal: Could ...
随机推荐
- SetConsoleTitle 函数--设置控制台窗口标题
SetConsoleTitle函数 来源:https://msdn.microsoft.com/en-us/library/windows/desktop/ms686050(v=vs.85).aspx ...
- HDU - 3697 Selecting courses
题目链接:https://vjudge.net/problem/HDU-3697 题目大意:选课,给出每门课可以的选课时间.自开始选课开始每过五分钟可以选一门课,开始 时间必须小于等于四,问最多可以选 ...
- cordova plugin汇总大全
1.获取当前应用的版本号 cordova plugin add cordova-plugin-app-version 2.获取网络连接信息 cordova plugin add cordova-plu ...
- java对Microsoft Document的操作--->对Excel的操作
起初,自己想对网站上爬取一些数据来写到Excel表格中,便在网上找了找java操作Excel接口,了解到Apache的POI接口可以对微软的文档进行操作,WIKI搜索的结果如下, HSSF - 提供读 ...
- 腾讯 AlloyCrop 1.0 发布
写在前面 AlloyCrop 这个项目是8个月前发布的,作为AlloyFinger 的典型案例,发布之后被BAT等其他公司广泛使用.但是发布之后,有两个问题一直没有抽出时间去解决: 裁剪图像的分辨率太 ...
- 蓝桥杯比赛java 练习《立方变自身》
立方变自身 观察下面的现象,某个数字的立方,按位累加仍然等于自身.1^3 = 1 8^3 = 512 5+1+2=817^3 = 4913 4+9+1+3=17... 请你计算包括1,8, ...
- 测试环境-memcached安装与说明
一,下载memcached和libevent安装包: 1,Memcache用到了libevent这个库用于Socket的处理,所以还需要安装libevent (这两个包百度上都能找到) 二,安装lib ...
- 53. leetcode557. Reverse Words in a String III
557. Reverse Words in a String III Given a string, you need to reverse the order of characters in ea ...
- 贡献你的代码,将jar包发布到Maven中央仓库以及常见错误的解决办法
前几天将自己的日志工具发布到了Maven中央仓库中.这个工具本省没有多少技术含量,因为是修改别人的源代码实现的,但是将jar发布到Maven仓库却收获颇丰,因为网上有些教程过时了,在此分享下自己发布j ...
- CocoaPods详解之----制作篇【转】
Cocoapods是非常好用的一个iOS依赖管理工具,使用它可以方便的管理和更新项目中所使用到的第三方库,以及将自己的项目中的公共组件交由它去管理.Cocoapods的介绍及优点本文就不在赘述,我开始 ...