SpringMVC.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:mvc="http://www.springframe…
pom.xml配置 <dependencies> <!-- hibernate begin --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>4.2.1.Final</version> </dependency> <dependency…
hibernate注解实体类示例 package cn.bdqn.smvc.entity; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; @Entity…
Spring Boot 概述: Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run".We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum…
1.创建一个maven project 为spring1 2.进行项目的配置:默认的java 1.5 在properties中选择project facts项目进行配置,反选web之后修改java环境为1.8.修改之后如下图: 3. 配置好的工作目录如下: 4 修改pom.xml文件 增加两个jar包:servlet和spring webmvc pom.xml如下: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web A…
1.创建maven web项目 2. 配置pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0…
最近公司事情比较少,便想利用这段空闲时间做一个自己的博客. 前端界面已经搞好,感谢杨姐的模板,自己稍微把模板没有的模块给补全了. 今天便开始自己的SSM框架搭建,数据库链接是采用数据库连接池.先上个项目结构图: 这个是基于Maven搭建的ssm框架,我把service层删除了,去掉了dao层接口,业务在需要与数据库交互的时候便直接调用dao层的方法. 1.创建maven项目,maven没有接触过的请自行百度 maven项目在eclisp如何创建. 2.配置 pom.xml 加载jar包 <pro…
最近做的项目一直在使用memcached作为缓存来缓存各种数据,现在BOSS要在项目上加上缓存.并把任务交给我.便琢磨怎么解决这个问题. 看了很多文章,写的比较详尽靠谱的就是这篇了http://www.cnblogs.com/cczhoufeng/archive/2013/04/09/3009578.html,结合自身项目做出了一些改动,在此分享出来. 该套框架的基本思路是:利用Spring-AOP在项目的DAOImpl层做一个环绕切面,在方法上添加自定义注解实现细粒度的控制,在环绕切面上使用C…
https://gitee.com/lightsever/netcore_study/tree/master/server02_path 先上代码,首先我们把httpserver封装一下,以后用起来方便 这个封装里直接包装了一个简单的根据path去分路由表 如图 /abc  /aaa /con_abc 这几个路径指定了对应的http响应函数 ,或者响应对象 使用响应函数和响应对象没有任何区别,只是根据需要自行选择. 这就完成了一个httpserver 第二重要的功能:路由表 dotnet 平台有…
本实例采用springMvc hibernate 与 spring 进行整合, 用springmvc 取代了原先ssh(struts,spring,hibernate)中的struts来扮演view层的角色... 实例搭建参照了几个前辈的例子: 参照1  参照2, 感谢他们的分享,很有用的博客. 下面介绍下项目结构图: 结构一: 结构二:           web.xml代码如下: <?xml version="1.0" encoding="UTF-8"?&…