SuperMarketSys_SSM超市管理系統(Spring+SpringMVC+Mybatis)
web.xml配置以及相應框架配置檔案
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>SuperMarketSys_SSM</display-name>
<welcome-file-list>
<welcome-file>/WEB-INF/jsp/login.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class >
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:springmvc-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext-*.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.properties</param-value>
</context-param>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>SuperMarketSys_SSM.root</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.util.Log4jConfigListener
</listener-class>
</listener>
</web-app>
resource包
applicationContext-mybatis.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:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
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.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<!-- 掃描service層所有的包 -->
<context:component-scan base-package="com.yccz.service"/>
<!-- <context:component-scan base-package="com.yccz.entity"/> -->
<!-- 讀取資料庫配置檔案 -->
<context:property-placeholder location="classpath:database.properties"/>
<!-- JNDI獲取資料來源(使用dbcp連線池) -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" scope="singleton">
<property name="driverClassName" value="${driver}" />
<property name="url" value="${url}" />
<property name="username" value="${user}" />
<property name="password" value="${password}" />
<property name="initialSize" value="${initialSize}"/>
<property name="maxActive" value="${maxActive}"/>
<property name="maxIdle" value="${maxIdle}"/>
<property name="minIdle" value="${minIdle}"/>
<property name="maxWait" value="${maxWait}"/>
<property name="removeAbandonedTimeout" value="${removeAbandonedTimeout}"/>
<property name="removeAbandoned" value="${removeAbandoned}"/>
<!-- sql 心跳 -->
<property name= "testWhileIdle" value="true"/>
<property name= "testOnBorrow" value="false"/>
<property name= "testOnReturn" value="false"/>
<property name= "validationQuery" value="select 1"/>
<property name= "timeBetweenEvictionRunsMillis" value="60000"/>
<property name= "numTestsPerEvictionRun" value="${maxActive}"/>
</bean>
<!-- 事務管理 -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<!-- 配置mybitas SqlSessionFactoryBean-->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configLocation" value="classpath:mybatis-config.xml"/>
</bean>
<!-- AOP 事務處理 開始 -->
<aop:aspectj-autoproxy />
<aop:config proxy-target-class="true">
<aop:pointcut expression="execution(* *com.yccz.service..*(..))" id="transService"/>
<aop:advisor pointcut-ref="transService" advice-ref="txAdvice" />
</aop:config>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" rollback-for="Exception" />
</tx:attributes>
</tx:advice>
<!-- AOP 事務處理 結束 -->
<!-- 沒有必要在 Spring 的 XML 配置檔案中註冊所有的對映器。
相反,你可以使用一個 MapperScannerConfigurer , 它 將 會 查 找 類 路 徑 下 的 映 射 器 並 自 動 將 它 們 創 建 成 MapperFactoryBean。 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.yccz.dao" />
</bean>
</beans>
mybatis-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<!-- 懶載入配置 -->
<setting name="lazyLoadingEnabled" value="false" />
</settings>
<typeAliases>
<!--這裡給實體類取別名,方便在mapper配置檔案中使用-->
<package name="com.yccz.entity"/>
</typeAliases>
</configuration>
springmvc-servlet.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.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
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.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<!-- 掃描所有的controller層下的類 -->
<context:component-scan base-package="com.yccz.controller"/>
<!-- 這個標籤註冊了Spring MVC分發請求到控制器所必須的DefaultAnnotationHandlerMapping和AnnotationMethodHandlerAdapter例項 -->
<mvc:annotation-driven/>
<!-- 掃描所有的靜態檔案,不寫所有的js無效 -->
<mvc:resources location="/statics/" mapping="/statics/**"/>
<mvc:default-servlet-handler/>
<!-- 解決json資料傳遞的中文亂碼問題-StringHttpMessageConverter -->
<mvc:annotation-driven>
<mvc:message-converters>
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>application/json;charset=UTF-8</value>
</list>
</property>
</bean>
<!-- 解決JSON資料傳遞的日期格式問題-->
<bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>text/html;charset=UTF-8</value>
<value>application/json</value>
</list>
</property>
<property name="features">
<list>
<!-- Date的日期轉換器 -->
<value>WriteDateUseDateFormat</value>
</list>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
<!-- 完成檢視的對應 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
<!-- 上傳下載 -->
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- 上傳檔案大小上限,單位為位元組(10MB) -->
<property name="maxUploadSize">
<value>10485760</value>
</property>
<!-- 請求的編碼格式,必須和jSP的pageEncoding屬性一致,以便正確讀取表單的內容,預設為ISO-8859-1 -->
<property name="defaultEncoding">
<value>UTF-8</value>
</property>
</bean>
</beans>
database.properties
driver=com.mysql.jdbc.Driver
#在和mysqlä¼ é€’æ•°æ®çš„过程ä¸ï¼Œä½¿ç”¨unicodeç¼–ç æ ¼å¼ï¼Œå¹¶ä¸”å—符集设置为utf-8
url=jdbc:mysql://localhost:3306/smbms?useUnicode=true&characterEncoding=utf-8
user=root
password=123
minIdle=45
maxIdle=50
initialSize=5
maxActive=100
maxWait=100
#\u8D85\u65F6\u65F6\u95F4\uFF1B\u5355\u4F4D\u4E3A\u79D2\u3002180\u79D2=3\u5206\u949F
removeAbandonedTimeout=180
#\u8D85\u8FC7\u65F6\u95F4\u9650\u5236\u662F\u5426\u56DE\u6536
removeAbandoned=true
實體層entity(省略set、get方法)
package com.yccz.entity;
import java.util.Date;
import java.util.List;
/**
* 訂單表
* @author Administrator
*
*/
public class Bill {
private int id;
private String billCode;
private String productName;
private String productDesc;
private String productUnit;
private double productCount;
private double totalPrice;
private int isPayment;
private int createdBy;
private Date creationDate;
private int modifyBy;
private Date modifyDate;
private int providerId;
private String proName;
//供應商集合
private Provider provider;
}
}
package com.yccz.entity;
import java.util.Date;
/**
*
* <p>Title: Provider</p>
* <p>Description:供應商類 </p>
* <p>Company: </p>
* @author Bill
* @date 2017年10月20日
*/
public class Provider {
private int id;
private String proCode;
private String proName;
private String proDesc;
private String proContact;
private String proPhone;
private String proAddress;
}
/**
* 使用者表
* @author Administrator
*
*/
@Component
public class User {
@Autowired
RoleService roleService;
private int id;
private String userCode;
private String userName;
private String userPassword;
private int gender;
//解決json日期格式轉換問題-註解方式
@JSONField(format="yyyy-MM-dd")
private Date birthday;
private String phone;
private String address;
private int userRole;
private int createdBy;
private Date creationDate;
private int modifyBy;
private Date modifyDate;
private String roleName;
private int age;
private String idPicPath; //證件照路徑
private String workPicPath; //工作證照片路徑
public void setGender(int gender) {
if(gender==1){
this.sex="男";
}else{
this.sex="女";
}
this.gender = gender;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
//通過生日算出年齡
Date now = new Date();
int age = 0;
SimpleDateFormat format_y = new SimpleDateFormat("yyyy");
SimpleDateFormat format_M = new SimpleDateFormat("MM");
String birth_year = format_y.format(birthday);
String this_year = format_y.format(now);
String birth_month = format_M.format(birthday);
String this_month = format_M.format(now);
age = Integer.parseInt(this_year)-Integer.parseInt(birth_year);
if(birthday==null){
age=10000;
}
if(this_month.compareTo(birth_month)<0){
age-=1;
}
if(age<0){
age = 0;
}
this.age = age;
this.birthday = birthday;
}
}
import java.util.Date;
public class Role {
private Integer id; //id
private String roleCode; //角色編碼
private String roleName; //角色名稱
private Integer createdBy; //建立者
private Date creationDate; //建立時間
private Integer modifyBy; //更新者
private Date modifyDate;//更新時間
}
util包
//分頁的類,可以統一寫成PageHellper
public class BillPage {
// 總頁數
private int totalPageCount = 0;
// 頁面大小,即每頁顯示記錄數
private int pageSize = 5;
// 記錄總數
private int totalCount;
// 當前頁碼
private int currPageNo = 1;
// 每頁訂單集合
private List<Bill> billList;
public int getCurrPageNo() {
return currPageNo;
}
public void setCurrPageNo(int currPageNo) {
if (currPageNo > 0)
this.currPageNo = currPageNo;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
if (pageSize > 0)
this.pageSize = pageSize;
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {//總記錄60條資料 頁面大小 5條
if (totalCount > 0) {
this.totalCount = totalCount;
// 計算總頁數
this.totalPageCount = this.totalCount % pageSize == 0 ? (this.totalCount / pageSize)
: (this.totalCount / pageSize + 1);
if(currPageNo>totalPageCount)
this.currPageNo = totalPageCount;
}
}
public int getTotalPageCount() {
return totalPageCount;
}
public void setTotalPageCount(int totalPageCount) {
this.totalPageCount = totalPageCount;
}
public List<Bill> getBillList() {
return billList;
}
public void setBillList(List<Bill> billList) {
this.billList = billList;
}
}
使用者管理模組
Dao層(資料持久層)
UserMapper.java
package com.yccz.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.yccz.entity.User;
/**
* <p>Title: UserMapper</p>
* <p>Description: </p>
* <p>Company: </p>
* @author Bill
* @date 2017年10月18日
*/
public interface UserMapper {
public User getUserByCode(@Param("userCode")String userCode);
public List<User> queryUsers(@Param("userName")String userName,@Param("userRole")String userRole,@Param("start")int start,@Param("size")int size);
public User findUser(@Param("userCode")String userCode,@Param("userPassword") String userPassword);
public int getUserCount(@Param("userName")String userName,@Param("userRole")String userRole);
public int add(User user);
public int modify(User user);
public User getUserById(String userid);
public int updatePwd(int id,String pwd);
public int deleteUserById(Integer delId);
}
UserMapper.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yccz.dao.UserMapper">
<resultMap type="User" id="userMap">
<result property="id" column="id"/>
<result property="userCode" column="userCode"/>
<result property="userName" column="userName"/>
<result property="phone" column="phone"/>
<result property="birthday" column="birthday"/>
<result property="gender" column="gender"/>
<result property="userRole" column="userRole"/>
<result property="roleName" column="roleName"/>
</resultMap>
<select id="findUser" resultMap="userMap">
select u.*,r.roleName from smbms_user u,smbms_role r where u.userRole=r.id and u.userCode=#{userCode} and u.userPassword=#{userPassword}
</select>
<select id="getUserByCode" resultType="User">
select * from smbms_user u
<trim prefix="where" prefixOverrides="and | or">
<if test="userCode!=null">
and u.userCode = #{userCode}
</if>
</trim>
</select>
<resultMap type="User" id="userList">
<result property="id" column="id"/>
<result property="userCode" column="userCode"/>
<result property="userName" column="userName"/>
<result property="phone" column="phone"/>
<result property="birthday" column="birthday"/>
<result property="gender" column="gender"/>
<result property="userRole" column="userRole"/>
<result property="roleName" column="roleName"/>
</resultMap>
<select id="queryUsers" resultMap="userList">
select u.*,r.roleName from smbms_user u,smbms_role r where u.userRole = r.id
<if test="userName != null and userName != ''">
and u.userName like CONCAT ('%',#{userName},'%')
</if>
<if test="userRole != null and userRole!=0">
and u.userRole = #{userRole}
</if>
order by creationDate DESC limit #{start},#{size}
</select>
<select id="getUserCount" resultType="Int">
select count(1) as count from smbms_user u,smbms_role r where u.userRole = r.id
<if test="userName != null and userName != ''">
and u.userName like CONCAT ('%',#{userName},'%')
</if>
<if test="userRole != null and userRole!=0">
and u.userRole = #{userRole}
</if>
</select>
<select id="getUserById" resultType="user">
select u.*,r.roleName from smbms_user u,smbms_role r
where u.id=#{userid} and u.userRole=r.id
</select>
<insert id="add" parameterType="User">
insert into smbms_user (userCode,userName,userPassword,gender,birthday,phone,
address,userRole,createdBy,creationDate,idPicPath,workPicPath)
values (#{userCode},#{userName},#{userPassword},#{gender},#{birthday},#{phone},
#{address},#{userRole},#{createdBy},#{creationDate},#{idPicPath},#{workPicPath})
</insert>
<update id="modify" parameterType="User">
update smbms_user
<trim prefix="set" suffixOverrides="," suffix="where id = #{id}">
<if test="userCode != null">userCode=#{userCode},</if>
<if test="userName != null">userName=#{userName},</if>
<if test="userPassword != null">userPassword=#{userPassword},</if>
<if test="gender != null">gender=#{gender},</if>
<if test="birthday != null">birthday=#{birthday},</if>
<if test="phone != null">phone=#{phone},</if>
<if test="address != null">address=#{address},</if>
<if test="userRole != null">userRole=#{userRole},</if>
<if test="modifyBy != null">modifyBy=#{modifyBy},</if>
<if test="modifyDate != null">modifyDate=#{modifyDate},</if>
<if test="idPicPath != null">idPicPath=#{idPicPath},</if>
<if test="workPicPath != null">workPicPath=#{workPicPath},</if>
</trim>
</update>
<update id="updatePwd" parameterType="Integer">
update smbms_user set userPassword=#{pwd} where id=#{id}
</update>
<delete id="deleteUserById" parameterType="Integer">
delete from smbms_user where id=#{delId}
</delete>
</mapper>
service(業務處理層)
UserService.java
**package com.yccz.service;
import java.util.List;
import com.yccz.entity.User;
public interface UserService {
public User findUser(String userCode, String userPassword);
public List<User> queryUsers(String queryname,String queryUserRole,int start,int size);
public int getUserCount(String queryname,String queryUserRole);
public boolean add(User user);
public boolean modify(User user);
public User getUserById(String userid);
public User getUserByCode(String userCode);
public boolean updatePwd(int id,String pwd);
public boolean deleteUserById(Integer delId);
}
UserServiceImpl.java
package com.yccz.service.impl;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yccz.dao.UserMapper;
import com.yccz.entity.User;
import com.yccz.service.UserService;
@Service
public class UserServiceImpl implements UserService {
@Resource
private UserMapper userMapper;
@Override
public User findUser(String userCode, String userPassword) {
return userMapper.findUser(userCode, userPassword);
}
@Override
public List<User> queryUsers(String userName, String userRole,
int start, int size) {
start = (start-1)*size;
return userMapper.queryUsers(userName, userRole, start, size);
}
@Override
public int getUserCount(String userName, String userRole) {
return userMapper.getUserCount(userName, userRole);
}
@Override
public boolean add(User user) {
boolean flag = false;
int rows = userMapper.add(user);
if(rows>0){
flag=true;
System.out.println("add success!");
}else{
System.out.println("add failed!");
}
return flag;
}
@Override
public boolean modify(User user) {
boolean flag = false;
if(userMapper.modify(user)>
相關推薦
SuperMarketSys_SSM超市管理系統(Spring+SpringMVC+Mybatis)
web.xml配置以及相應框架配置檔案
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XM
企業框架寫的簡單學生資訊管理系統(springMVC,mybatis)
雖然搭建企業框架繁雜了些,但是搭建好後寫的程式碼還是少多了聽著用企業框架寫的感覺要高大上一點有木有先看看演示的效果圖:1.輸入:localhost:8080/rjday7/listStudent.action2.輸入id進行查詢3.id查詢結果:可見已經是另一個action了
一個SSM(Spring+SpringMVC+Mybatis)+jQuery EasyUI開發的ERP系統
生產管理ERP系統
專案
這是一個生產管理ERP系統。依託科技計劃重點專案“裝備物聯及生產管理系統研發”,專案研發裝備物聯以及生產管理的系統,主要包括:計劃進度、裝置管理、工藝監控、物料監控、人員監控、質量監控、系統管理7大模組。專案原始碼共享在github上面:http://gi
多工程:基於Maven的SSM(Spring,SpringMvc,Mybatis)整合的web工程(中)
png 開始 版本 war mage ont 右鍵 調用 web工程 上篇用了單工程創建了SSM整合的web工程(http://www.cnblogs.com/yuanjava/p/6748956.html),這次我們把上篇的單工程改造成為多模塊工程
一:創建
SSM框架——詳細整合教程(Spring+SpringMVC+MyBatis)轉載(http://blog.csdn.net/zhshulin/article/details/23912615)
rop 用戶名 file .org 我們 XML model lib targe 這兩天需要用到MyBatis的代碼自動生成的功能,由於MyBatis屬於一種半自動的ORM框架,所以主要的工作就是配置Mapping映射文件,但是由於手寫映射文件很容易出錯,所以可利用MyBa
SSM框架——詳細整合教程(Spring+SpringMVC+MyBatis)
r.js lai action body south 日誌輸出 aop pes 完整 使用SSM(Spring、SpringMVC和Mybatis)已經有三個多月了,項目在技術上已經沒有什麽難點了,基於現有的技術就可以實現想要的功能,當然肯定有很多可以改進的地方。之前沒有
SSM(Spring+SpringMVC+Mybatis)框架搭建詳細教程【附源代碼Demo】
oid rep images end 訪問靜態文件 into *** 寫到 where http://www.cnblogs.com/qixiaoyizhan/p/7751732.html
【前言】
應某網絡友人邀約,需要一個SSM框架的Demo作為基礎學習資料,於
SSM三大框架整合詳細教程(Spring+SpringMVC+MyBatis)
json轉換 需要 acc log4 err ppi junit測試 日誌 enc 使用 SSM ( Spring 、 SpringMVC 和 Mybatis )已經有三個多月了,項目在技術上已經沒有什麽難點了,基於現有的技術就可以實現想要的功能,當然肯定有很多可以改進的地
圖書管理系統(spring springmvc)
提醒 water fonts 信息 修改 springmvc reader spa -m Spring入門demo||圖書管理系統
一.
本圖書管理系統基於spring,spring mvc,數據庫為mysql。前端使用了Bootstrap。 非常適合學習spring的新手
SSM三大框架整合配置(Spring+SpringMVC+MyBatis)
lean source reat ati quest req 繼續 時間 per web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2
uploadify在火狐下上傳不了的解決方案,java版(Spring+SpringMVC+MyBatis)詳細解決方案
分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow
也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!
 
SSM框架整合方案(Spring+SpringMVC+Mybatis)
一、將application進行縱向切分,每一個配置檔案只配置與之相關的Bean
除此之外,專案中通常還有log4j.properties、SqlMapConfig.xml、db.properties檔案
二、 各檔案配置方案詳解
(1)日誌元件log4j的配置檔案:
SSM整合(Spring/SpringMVC/Mybatis)
SSM整合(Spring4.3.7.RELEASE/SpringMVC4.3.7.RELEASE/Mybatis3.4.2)
1.該SSM以Maven的方式進行整合
2.建立一個Maven工程,在pom.xml檔案中加入依賴,也即Maven座標(GAV)
<dependen
ssm(spring + Springmvc + mybatis)框架整合 · 筆記
一、環境配置
材料準備:
JDK1.8
Maven
Tomcat7
Eclipse
MySQL
1、下載完後的maven配置:
(1)配置本地倉庫 :開啟conf資料夾中的 settings.xml 將藍下滑線中的內容複製出來填寫自己的本地倉庫地址
<
SSM框架搭建2(spring+springmvc+mybatis)
SSM框架搭建(spring+springmvc+mybatis)
置頂2018年01月23日 16:10:38丁文浩閱讀數:55506
自己配置了一個SSM
SSM框架搭建(spring+springmvc+mybatis)
一.建立web專案(eclipse)
File-->new-->Dynamic Web Project (這裡我們建立的專案名為SSM)
下面是大致目錄結構
二. SSM所需jar包。
jar包連結:https://pan.b
手把手教你如何從零開始在eclipse上搭起一個ssm(spring+springMVC+myBatis)框架
1.新建一個Maven專案
直接點選next: 選擇這個,這個是指javaWeb專案 輸入maven專案的座標 點選finish,建立專案完成
2.新增maven依賴並下載
找到剛建的maven專案下的pom.xml配置檔案,開啟:
接下來,在url和depe
如何部署SSM框架(Spring+SpringMVC+MyBatis)到SAE(新浪雲伺服器)圖文教程
在學習cocos2dx手遊開發的過程中,為了實現使用者註冊、使用者登陸和世界排行榜這些模組,需要用到伺服器來搭建平臺。以前都是
在本地搭建伺服器,在本科期間使用過IIS和Tomcat,感覺在本地搭建伺服器還是蠻簡單的,網上有豐富的資源參考。讀研期間開始學
超市管理系統(C語言)課程設計(新手)
一個不是很完善的設計,目的是實現基礎功能。
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <ti
SSM框架整合(IntellIj IDEA+Maven+Spring+SpringMVC+MyBatis)之MyBatis
我認為框架整合不熟練的話按照MyBatis->SpringMVC->Spring順序整合比較好,先配置MyBatis是因為不需要額外的配置伺服器,進行單元測試比較容易。Spring是用來進行整合的,所以等其它框架配置好之後進行整合不會顯得很亂。