- Spring4+Hibernate4+Mybatis Maven的pom配置
wanhf11
Maven
4.0.0org.digdataswustoj30.0.1-SNAPSHOTwarswustoj3UTF-84.0.4.RELEASE1.7.41.7.134.3.8.Final3.3javaxjavaee-api7.0providedorg.glassfish.webjavax.servlet.jsp.jstl1.2.2providedjavax.servletservlet-api2.5pro
- POI异步导入Excel兼容xsl和xlsx
weixin_33775572
数据库jsonjava
项目架构:spring+struts2+hibernate4+oracle需求:用户导入excel文件,导入到相应的数据表中,要求提供导入模板,支持xls和xlsx文件思路分析:1、提供一个下载链接,点击下载,可以使超链接,src直接是项目路径加文件名。2、通过上传文件,服务器接收上传,返回一个上传后的服务器本地路径,通过ajax异步赋值到jsp的路径隐藏域。3、ajax异步提交导入请求,后台处理
- springmvc4整合AJAX使用@ResponseBody注解返回JSON数据格式
HD243608836
AJAXspringMVC4AJAXResponseBody
一、在使用springMVC4+Hibernate4集成框架,需要使用到@ResponseBody注解来配合AJAX的使用,但依靠springMVC3的配置和jar包可能会出现1.java.lang.ClassNotFoundException:com.fasterxml.jackson.core.Jso;2.java.lang.IllegalStateException:LifecyclePro
- hibernate4与3使用annotation在配置文件中的区别
千奇百怪的漫长旅行
java
让hibernate4与3在配置文件中的区别有几点:1、获取sessionfactory的方式:在hibernate3中获取sessionfactory的方式:在hibernate4中则是使用这种方式:2、事物的使用:hibernate3:hibernate4:3、使用缓存机制:hibernate3:threadhibernate4:org.springframework.orm.hibernat
- Hibernate 4 升级到 Hibernate 5 的时候 SessionFactory 不能使用
HoneyMoose
在Hibernate4升级到5的时候老的sessionFactory出现错误。publicstaticSessionFactoryinitSession(){Configurationconfiguration=newConfiguration();configuration.configure();serviceRegistry=newStandardServiceRegistryBuilder
- java.lang.NoClassDefFoundError: org/hibernate/service/jta/platform/spi/JtaPlatform
莫扎特不唱摇篮曲
采用spring3.2.9与hibernate4.3.5集成,结果报错ERROR:HHH000302:Unabletoconstructcurrentsessioncontext[org.springframework.orm.hibernate4.SpringSessionContext]java.lang.reflect.InvocationTargetExceptionatsun.refle
- activiti(一)spring4+hibernate4
飞天代码
activitihibernatespringactivity
最近有个项目就是对activity进行封装,用于企业流程驱动。第一步就是搭建环境咯,首先我们先将hibernate4+spring4搭建好,再将activity包放入到项目中。下载spring包和hibernate包,这里就不讲解了,大概需要的jar包如下:项目配置文件图:web.xml的内容:ArchetypeCreatedWebApplicationcontextConfigLocationc
- J2EE系列之MyBatis学习笔记(一)-- 简介
Java小飞侠
Java程序开发MyBatis简介MyBatis学习
目前为止J2EE系列已经学习了Struts2、Hibernate4、Spring、SpringMVC。其中Struts2、hibernate,spring三者组成了常用的软件架构S2SH,在S2SH中Struts2负责前后台之间的交互,Hibernate负责数据库操作,Spring负责管理struts2和hibernate4。学习了SpringMVC之后发现SpringMVC具有了Struts2和
- Hibernate4复习之Hibernate4简介
Java学习之乐
今日目录:1、Hibernate4简介2、Hibernate4版版HelloWorld实现一、Hibernate4简介官网:http://hibernate.org/Hibernate是一个开放源代码的对象关系映射框架,它对JDBC进行了非常轻量级的对象封装,使得Java程序员可以随心所欲的使用对象编程思维来操纵数据库。Hibernate可以应用在任何使用JDBC的场合,既可以在Java的客户端程
- springboot1.5升2.1.6遇到的坑啊!!!!
膨胀的泡
先升级一下springboot1.升级之后发现项目里集成的其他组件也需要升级hibernate4—>hibernate5修改内容:(配置文件,我用的是properties)1.banner.charset=UTF-8=>spring.banner.charset=UTF-82.spring.jpa.properties.hibernate.current_session_context_class
- Hibernate4入门02--关联映射
CodeManLB
一,关联映射1,多对一映射两张表的关系是多对一的关系,这种配置是从多的一方配置,只修改多的一方的实体类和映射文件。配置完成之后,会自动和关联类的主键进行连接查询,所以无需指明关联类对应的连接属性;配置过程:修改实体类:1.1,删除实体类中作为外键的属性,以及对应的get和set方法;1.2,使用关联类的声明新的属性,并增加对应的get和set方法,实现关联关系;修改映射文件:2.1,删除外键属性对
- 烟草企业物流管理信息系统的分析与设计(论文+源码)_kaic
开心工作室_kaic
计算机文章毕业设计数据库智能手机开发语言服务器硬件工程javascriptc#
摘要在经济高速发展的今天,物流业已经成为支撑国民经济的基础性产业。作为一种新型服务业,物流业集仓储、运输、信息等为一体,发展成为复合型战略性产业。S烟草企业设计的物流管理信息系统利用B/S模式的三层结构,基于JSP技术和JDBC数据库访问技术,整合Hibernate4.1、Struts2、Spring3.0框架,采用MySQL5数据库存储数据。本文利用计算机、数据库等方面的知识,并结合我国物流管理
- Spring4+SpringMVC4+Hibernate4整合
ZOnePerson
2.导包1.springMVC包2.hibernate基本包3.日志包4.mysql驱动包3.web.xml配置1.配置spring的IOC容器contextConfigLocationclasspath:applicationContext.xmlorg.springframework.web.context.ContextLoaderListener2.配置springMVC的控制器(serv
- Grails3.0.x-3.1.x由hibernate4升级至hibernate5
静静黑夜
build.gradle中buildscript下面的hibernate4更换为://classpath"org.grails.plugins:hibernate4:5.0.5"classpath"org.grails.plugins:hibernate5:5.0.5"依赖更换://compile"org.grails.plugins:hibernate4"//compile"org.hibern
- hibernate4--03对象生命周期及crud操作
marjorie叶子
1.对象状态及生命周期image瞬时状态(Transient):在通过new关键字,实例化一个对象开始,该对象就进入了临时状态,但它还没有被持久化,没有保存在Session当中。持久状态(Persistent):对象被加入到Session缓存当中,如通过session.save(entity),Hibernate把实体保存到seesion当中,entity就处在持久化状态中。游离状态(Detach
- spring3+hibernate4 service中多线程事务异常及解决
Ajian
BUGJAVAJDBCSSH
初次使用spring3结合hibernate4做项目,迅速配置完成,测试,一切正常。然而,当我在service层中另外开启一个线程,线程中的方法需要进行数据库操作,这个时候,悲催的抛出了异常:-org.hibernate.HibernateException:NoSessionfoundforcurrentthread当然,hibernate4的session是和当前线程绑定的,多线程中用sess
- Hibernate4复习之Hibernate4 CRUD体验
Java学习之乐
今日目录:1、HibernateUtil封装2、XML版CRUD实现3、注解版CRUD实现4、Junit4单元测试框架引入一、HibernateUtil封装二、注解版CRUD实现Teacher.javaTeacherTest.javaHibernate.hbm.xml三、注解版CRUD实Student.javaStudent.hbm.xmlStudentTest.java四、Junit4单元测试框
- 使用IDEA+Maven搭建整合一个Struts2+Spring4+Hibernate4项目,混合使用传统Xml与@注解,返回JSP视图或JSON数据,快来给你的SSH老项目翻新一下吧
帅龍之龍
#SSH古董框架Javajava后端
大学时做过一些基于Struts+Spring+Hibernate的项目,但是项目是使用MyEclipse或者Eclipse工具来开发的,而且还是外部地引入依赖包,甚是麻烦。想着翻新一下曾今写的一些SSH项目,于是使用IDEA+Maven来搭建整合一下。主要就是拿来玩的,听说Struts2挺多漏洞的,有过几次漏洞事故,不知修复得怎么样,至于这个技术,大家就简单看看就好了。一、创建一个Maven项目(
- com.atomikos.datasource.ResourceException: Error in recovery 错误的解决
老吕架构
JTAAtomikosoracle
spring3+hibernate4+atomikos配置实现JTA分布式事务,系统启动时控制台出现以下异常信息:Exception:com.atomikos.datasource.ResourceException:Errorinrecovery这主要是数据库账号权限问题引起的,解决方案如下:以sysdba登录数据库,给相应地用户赋予以下权限:grantselectonsys.dba_pendi
- hibernate解压后的目录结构
打死你的小乌龟
hibernate解压后的目录结构documentationdocumentation文件夹:该路径下存放了Hibernate4的相关文档,包括Hibernate4的参考文档和API文档等。liblib文件夹:该文件夹存放Hibernate框架的核心类库以及Hibernate4的第三方类库。该文件夹下的required子目录存放运行Hibernate项目的必须的核心类库。projectprojec
- HelloWorld
helokity_zq
Java开发软件Java开发工具Eclipse(Java开发必会软件)Java开发工具MyEclipse(实用插件较多的开发软件)数据库mysql(必会的数据库)文本编辑工具notepad+(实用的多功能编辑器)服务器tomcat(Java开发必会)vmware12虚拟机(好用的虚拟机)FileZilla传文件(虚拟机配套上传操作工具)hibernate4.3.11.Final(框架)hibern
- Spring3整合Hibernate4遇到报错java.lang.ClassNotFoundException: org.springframework.orm.hibernate4.LocalSes...
weixin_30617561
java开发工具数据库
Spring3整合Hibernate4在用Junit测试保存数据库的时候遇到以下报错org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'userDao':Injectionofautowireddependenciesfailed;nestedexceptionisorg.springf
- SpringBoot和PostGIS环境搭建(Hibernate4)
贲_WM
JavaGISHibernateSpringBootPostGISHibernate4
根据项目需要,基于Hibernate4使用SpringBoot和PostGIS进行空间业务实现,经过多次尝试探索,终于实现空间增删改查,这里给出基本配置过程,以供大家参考。关于Hibernate5使用SpringBoot和PostGIS进行空间业务实现,配置更简单,可参看我的另一篇文章《SpringBoot和PostGIS环境搭建(Hibernate5)》。1、创建空间表创建普通关系表,如:CRE
- java postgis环境搭建_SpringBoot和PostGIS环境搭建(Hibernate5)
勤婧知浩
javapostgis环境搭建
使用上一篇《SpringBoot和PostGIS环境搭建(Hibernate4)》,配置较多,这里给出Hibernate5的SpringBoot和PostGIS环境搭建,仅仅引入一个hibernate-spatial-5.2.12.Final.jar包。同时,model类做相应调整,实现空间增删改查,以供大家参考。1、创建空间表创建普通关系表,如:CREATETABLEcity(idinteger
- hibernate4--01初识
marjorie叶子
1.持久化侠义概念:数据存储在物理存储介质不会丢失。广义概念:也就是对数据的crud操作都叫持久化。加载:hibernate里的,数据从数据库中加载到session。2.ORM(objectrelationmapping)image解决阻抗不匹配(对象和关系数据库不匹配)问题。没有侵入性:在代码中不用去继承hibernate类或实现hibernate提供接口Hibernate:是一个orm的轻量级
- hibernate4--04单向多对一以及单向一对多的关联映射
marjorie叶子
一丶单向多对一1.学生表student和年级表gradeimage2.类Student和Grade类Student:publicclassStudent{privateintid;privateStringname;privateintage;privateGradegrade;//get…set}Grade:publicclassGrade{privateintid;privateStringn
- java hibernate详细_Java事务管理学习之Hibernate详细介绍
吴域
javahibernate详细
hibernate是jdbc轻量级的封装,本身不具备事务管理的能力,在事物管理层面,一般是委托于底层的jdbc和jta来完成调度的。下面这篇文章主要给大家介绍了Java事务管理学习之Hibernate的相关资料,需要的朋友可以参考下。环境与版本hibernate版本:Hibernate4.2.2(下载后的文件名为hibernate-release-4.2.2.Final.zip,解压目录hiber
- Maven搭建SSH的pom的代码详解
三天打鱼两天晒猫
templateforminemavenssh
前言因项目需要第一次是用Maven搭建项目,在网上找了许久pom配置总是会出现一些包不兼容等小问题,经过多次改动版本测试,以下pom勉强能使用,但是hibernate配置实体类仍有问题。但因项目进度问题所以没有再进行测试修改了参考资料MyEclipse10.7使用Maven搭建Struts2+Spring3+Hibernate4的整合开发环境maveninaction(十)maven项目建立和运行
- Springboot+jpa+达梦数据库(DM)配置
火星coder
国产化配置达梦数据库DM数据库javaspringboot后端
场景:最近公司需要将一个系统用达梦数据库进行国产化配置,下面主要记录了整个配置过程准备1.需要下载安装好达梦数据库(DM),因为公司服务器已经安装有达梦数据库,所以这里没有安装教程哦2.达梦数据库驱动jar包DmJdbcDriver18.jar3.达梦数据库对hibernate的方言包DmDialect-for-hibernate4.0.jar备注:之前发现网上很多都是需要去找到这两个包,在项目中
- spring3与hibernate4的整合
TonySong111073
java
首先,spring与hibernate3整合时有三种方式:1、直接使用SessionFactory(该SessionFactory由spring管理并注入)的方式:@ResourcepublicvoidsetSessionFactory(SessionFactorysessionFactory){this.sessionFactory=sessionFactory;}protectedSessio
- java数字签名三种方式
知了ing
javajdk
以下3钟数字签名都是基于jdk7的
1,RSA
String password="test";
// 1.初始化密钥
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
keyPairGenerator.initialize(51
- Hibernate学习笔记
caoyong
Hibernate
1>、Hibernate是数据访问层框架,是一个ORM(Object Relation Mapping)框架,作者为:Gavin King
2>、搭建Hibernate的开发环境
a>、添加jar包:
aa>、hibernatte开发包中/lib/required/所
- 设计模式之装饰器模式Decorator(结构型)
漂泊一剑客
Decorator
1. 概述
若你从事过面向对象开发,实现给一个类或对象增加行为,使用继承机制,这是所有面向对象语言的一个基本特性。如果已经存在的一个类缺少某些方法,或者须要给方法添加更多的功能(魅力),你也许会仅仅继承这个类来产生一个新类—这建立在额外的代码上。
- 读取磁盘文件txt,并输入String
一炮送你回车库
String
public static void main(String[] args) throws IOException {
String fileContent = readFileContent("d:/aaa.txt");
System.out.println(fileContent);
- js三级联动下拉框
3213213333332132
三级联动
//三级联动
省/直辖市<select id="province"></select>
市/省直辖<select id="city"></select>
县/区 <select id="area"></select>
- erlang之parse_transform编译选项的应用
616050468
parse_transform游戏服务器属性同步abstract_code
最近使用erlang重构了游戏服务器的所有代码,之前看过C++/lua写的服务器引擎代码,引擎实现了玩家属性自动同步给前端和增量更新玩家数据到数据库的功能,这也是现在很多游戏服务器的优化方向,在引擎层面去解决数据同步和数据持久化,数据发生变化了业务层不需要关心怎么去同步给前端。由于游戏过程中玩家每个业务中玩家数据更改的量其实是很少
- JAVA JSON的解析
darkranger
java
// {
// “Total”:“条数”,
// Code: 1,
//
// “PaymentItems”:[
// {
// “PaymentItemID”:”支款单ID”,
// “PaymentCode”:”支款单编号”,
// “PaymentTime”:”支款日期”,
// ”ContractNo”:”合同号”,
//
- POJ-1273-Drainage Ditches
aijuans
ACM_POJ
POJ-1273-Drainage Ditches
http://poj.org/problem?id=1273
基本的最大流,按LRJ的白书写的
#include<iostream>
#include<cstring>
#include<queue>
using namespace std;
#define INF 0x7fffffff
int ma
- 工作流Activiti5表的命名及含义
atongyeye
工作流Activiti
activiti5 - http://activiti.org/designer/update在线插件安装
activiti5一共23张表
Activiti的表都以ACT_开头。 第二部分是表示表的用途的两个字母标识。 用途也和服务的API对应。
ACT_RE_*: 'RE'表示repository。 这个前缀的表包含了流程定义和流程静态资源 (图片,规则,等等)。
A
- android的广播机制和广播的简单使用
百合不是茶
android广播机制广播的注册
Android广播机制简介 在Android中,有一些操作完成以后,会发送广播,比如说发出一条短信,或打出一个电话,如果某个程序接收了这个广播,就会做相应的处理。这个广播跟我们传统意义中的电台广播有些相似之处。之所以叫做广播,就是因为它只负责“说”而不管你“听不听”,也就是不管你接收方如何处理。另外,广播可以被不只一个应用程序所接收,当然也可能不被任何应
- Spring事务传播行为详解
bijian1013
javaspring事务传播行为
在service类前加上@Transactional,声明这个service所有方法需要事务管理。每一个业务方法开始时都会打开一个事务。
Spring默认情况下会对运行期例外(RunTimeException)进行事务回滚。这
- eidtplus operate
征客丶
eidtplus
开启列模式: Alt+C 鼠标选择 OR Alt+鼠标左键拖动
列模式替换或复制内容(多行):
右键-->格式-->填充所选内容-->选择相应操作
OR
Ctrl+Shift+V(复制多行数据,必须行数一致)
-------------------------------------------------------
- 【Kafka一】Kafka入门
bit1129
kafka
这篇文章来自Spark集成Kafka(http://bit1129.iteye.com/blog/2174765),这里把它单独取出来,作为Kafka的入门吧
下载Kafka
http://mirror.bit.edu.cn/apache/kafka/0.8.1.1/kafka_2.10-0.8.1.1.tgz
2.10表示Scala的版本,而0.8.1.1表示Kafka
- Spring 事务实现机制
BlueSkator
spring代理事务
Spring是以代理的方式实现对事务的管理。我们在Action中所使用的Service对象,其实是代理对象的实例,并不是我们所写的Service对象实例。既然是两个不同的对象,那为什么我们在Action中可以象使用Service对象一样的使用代理对象呢?为了说明问题,假设有个Service类叫AService,它的Spring事务代理类为AProxyService,AService实现了一个接口
- bootstrap源码学习与示例:bootstrap-dropdown(转帖)
BreakingBad
bootstrapdropdown
bootstrap-dropdown组件是个烂东西,我读后的整体感觉。
一个下拉开菜单的设计:
<ul class="nav pull-right">
<li id="fat-menu" class="dropdown">
- 读《研磨设计模式》-代码笔记-中介者模式-Mediator
bylijinnan
java设计模式
声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/
/*
* 中介者模式(Mediator):用一个中介对象来封装一系列的对象交互。
* 中介者使各对象不需要显式地相互引用,从而使其耦合松散,而且可以独立地改变它们之间的交互。
*
* 在我看来,Mediator模式是把多个对象(
- 常用代码记录
chenjunt3
UIExcelJ#
1、单据设置某行或某字段不能修改
//i是行号,"cash"是字段名称
getBillCardPanelWrapper().getBillCardPanel().getBillModel().setCellEditable(i, "cash", false);
//取得单据表体所有项用以上语句做循环就能设置整行了
getBillC
- 搜索引擎与工作流引擎
comsci
算法工作搜索引擎网络应用
最近在公司做和搜索有关的工作,(只是简单的应用开源工具集成到自己的产品中)工作流系统的进一步设计暂时放在一边了,偶然看到谷歌的研究员吴军写的数学之美系列中的搜索引擎与图论这篇文章中的介绍,我发现这样一个关系(仅仅是猜想)
-----搜索引擎和流程引擎的基础--都是图论,至少像在我在JWFD中引擎算法中用到的是自定义的广度优先
- oracle Health Monitor
daizj
oracleHealth Monitor
About Health Monitor
Beginning with Release 11g, Oracle Database includes a framework called Health Monitor for running diagnostic checks on the database.
About Health Monitor Checks
Health M
- JSON字符串转换为对象
dieslrae
javajson
作为前言,首先是要吐槽一下公司的脑残编译部署方式,web和core分开部署本来没什么问题,但是这丫居然不把json的包作为基础包而作为web的包,导致了core端不能使用,而且我们的core是可以当web来用的(不要在意这些细节),所以在core中处理json串就是个问题.没办法,跟编译那帮人也扯不清楚,只有自己写json的解析了.
- C语言学习八结构体,综合应用,学生管理系统
dcj3sjt126com
C语言
实现功能的代码:
# include <stdio.h>
# include <malloc.h>
struct Student
{
int age;
float score;
char name[100];
};
int main(void)
{
int len;
struct Student * pArr;
int i,
- vagrant学习笔记
dcj3sjt126com
vagrant
想了解多主机是如何定义和使用的, 所以又学习了一遍vagrant
1. vagrant virtualbox 下载安装
https://www.vagrantup.com/downloads.html
https://www.virtualbox.org/wiki/Downloads
查看安装在命令行输入vagrant
2.
- 14.性能优化-优化-软件配置优化
frank1234
软件配置性能优化
1.Tomcat线程池
修改tomcat的server.xml文件:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxThreads="1200" m
- 一个不错的shell 脚本教程 入门级
HarborChung
linuxshell
一个不错的shell 脚本教程 入门级
建立一个脚本 Linux中有好多中不同的shell,但是通常我们使用bash (bourne again shell) 进行shell编程,因为bash是免费的并且很容易使用。所以在本文中笔者所提供的脚本都是使用bash(但是在大多数情况下,这些脚本同样可以在 bash的大姐,bourne shell中运行)。 如同其他语言一样
- Spring4新特性——核心容器的其他改进
jinnianshilongnian
spring动态代理spring4依赖注入
Spring4新特性——泛型限定式依赖注入
Spring4新特性——核心容器的其他改进
Spring4新特性——Web开发的增强
Spring4新特性——集成Bean Validation 1.1(JSR-349)到SpringMVC
Spring4新特性——Groovy Bean定义DSL
Spring4新特性——更好的Java泛型操作API
Spring4新
- Linux设置tomcat开机启动
liuxingguome
tomcatlinux开机自启动
执行命令sudo gedit /etc/init.d/tomcat6
然后把以下英文部分复制过去。(注意第一句#!/bin/sh如果不写,就不是一个shell文件。然后将对应的jdk和tomcat换成你自己的目录就行了。
#!/bin/bash
#
# /etc/rc.d/init.d/tomcat
# init script for tomcat precesses
- 第13章 Ajax进阶(下)
onestopweb
Ajax
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/
- Troubleshooting Crystal Reports off BW
blueoxygen
BO
http://wiki.sdn.sap.com/wiki/display/BOBJ/Troubleshooting+Crystal+Reports+off+BW#TroubleshootingCrystalReportsoffBW-TracingBOE
Quite useful, especially this part:
SAP BW connectivity
For t
- Java开发熟手该当心的11个错误
tomcat_oracle
javajvm多线程单元测试
#1、不在属性文件或XML文件中外化配置属性。比如,没有把批处理使用的线程数设置成可在属性文件中配置。你的批处理程序无论在DEV环境中,还是UAT(用户验收
测试)环境中,都可以顺畅无阻地运行,但是一旦部署在PROD 上,把它作为多线程程序处理更大的数据集时,就会抛出IOException,原因可能是JDBC驱动版本不同,也可能是#2中讨论的问题。如果线程数目 可以在属性文件中配置,那么使它成为
- 正则表达式大全
yang852220741
html编程正则表达式
今天向大家分享正则表达式大全,它可以大提高你的工作效率
正则表达式也可以被当作是一门语言,当你学习一门新的编程语言的时候,他们是一个小的子语言。初看时觉得它没有任何的意义,但是很多时候,你不得不阅读一些教程,或文章来理解这些简单的描述模式。
一、校验数字的表达式
数字:^[0-9]*$
n位的数字:^\d{n}$
至少n位的数字:^\d{n,}$
m-n位的数字:^\d{m,n}$