server using springmvc + myibatis + spring implementation,
Screenshot
Login :
home page :
list page :
tree page :
add pages :
server code section screenshot:
spring configuration:
<?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:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<context:annotation-config/>
<tx:annotation-driven transaction-manager="transactionManager" />
<context:component-scan base-package="com.school.portal" />
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/school?useUnicode=true&characterEncoding=utf8" />
<property name="username" value="root" />
<property name="password" value="123456" />
<property name="maxActive" value="80" />
<property name="maxIdle" value="20" />
<property name="maxWait" value="3000" />
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="typeAliasesPackage" value="com.school.portal.entity" />
<property name="mapperLocations" value="classpath*:mapper/*.xml" />
<property name="configLocation" value="classpath:myibatis-config.xml"></property>
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.school.portal.dao" />
<property name="markerInterface" value="com.school.portal.dao.BasicMapper"/>
</bean>
<bean id="springContext" class="com.school.portal.SpringContext"/>
<import resource="spring/spring-mvc.xml"/>
</beans>
springmvc configuration:
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<!-- DispatcherServlet Context: defines this servlet's request-processing
infrastructure -->
<context:component-scan base-package="com.school.portal.web.controller" />
<interceptors>
<interceptor>
<mapping path="/**" />
<beans:bean class="com.school.portal.web.interceptor.UserDetailInterceptor" />
</interceptor>
</interceptors>
<!-- 完成请求和注解POJO的映射 -->
<beans:bean
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
</beans:bean>
<beans:bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/views/"></beans:property>
<beans:property name="suffix" value=".jsp"></beans:property>
</beans:bean>
<beans:bean class="org.springframework.web.servlet.view.BeanNameViewResolver">
<beans:property name="order" value="1" />
</beans:bean>
<beans:bean id="jsonView" class="com.school.portal.web.view.CilentJsonView" />
</beans:beans>
dao code :
package com.school.portal.dao;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
public interface BasicMapper<T,PK extends Serializable> {
public abstract PK save(T t);
public abstract T getByPrimaryKey(PK id);
public abstract int updateByPrimaryKey(T t);
public abstract void deleteByPrimaryKey(PK id);
public abstract void deleteAllByPrimaryKey(List<PK> ids);
public abstract List<T> findAll();
public abstract int getTotal(@Param(value="paramMap")Map<String,Object> paramMap);
public abstract List<T> findByPage(@Param(value="pageNo")int pageNo,@Param(value="pageSize")int pageSize,
@Param(value="sort")String sort,@Param(value="order")String order,
@Param(value="paramMap")Map<String,Object> paramMap);
}
There are some features not implemented , just some small examples , are interested can focus github, I will spread at the source
------ Solution ---------- ----------------------------------
landlord to do good !
------ Solution ------------------------------------ --------
regressed small Demo Yeah
------ Solution ----------------------- ---------------------
learn ~
------ Solution - -------------------------------------------
say good source it? ?
------ For reference only -------------------------------------- -
pro , leaving the mail , send your mail can also be ...
------ For reference only -------------------- -------------------
yuanma
------ For reference only -------------------------------- -------
real Programmers
------ For reference only ------------------------ ---------------
good regressed . . Can you give a source brother ! !
------ For reference only -------------------------------------- -
Please landlord must believe me, you are a good man.
378325537@qq.com
------ For reference only ----------------------------- ----------
Please landlord must believe me, you are a good man.
378325537@qq.com
pro, has been sent to your mailbox !
------ For reference only ------------------------- --------------
a very powerful learning send a 807015628@qq.com
------ For reference only ---------------------------------------
Sent !
------ For reference only ------------------------------- --------
is_zhoufeng@163.com
------ For reference only ---------------------- -----------------
has been sent !
------ For reference only -------------------------------------- -
---- - For reference only ---------------------------------------
send a brother see, brother to help check, review under the code
------ For reference only ---------------------------- -----------
ensignli@sina.com
------ For reference only ------------------- --------------------
Men also source : coding234@sina.com, landlord good
------ For reference only - --------------------------------------
I have the source code , xiaoniba2750 @ sohu. com, thank you brother it
------ For reference only --------------------------------- ------
request to share the source, thank you 715647008@qq.com
------ For reference only ------------------- --------------------
same request, thank you for sharing 526721484@qq.com
------ For reference only ---------------------------------------
1653456033@qq.com
------ For reference only ---------------------------------------
429614073@qq.com ; please demo
------ For reference only --------------------------------- ------
1227730812@qq.com
------ For reference only ------------------------ ---------------
wanghaichao_9@163.com give me a source to a bar , learning to learn.
------ For reference only -------------------------------------- -
ybxywz@126.com
landlord good ! ! !
------ For reference only -------------------------------------- -
LZ doing really good, seeking the source
whaonchong@163.com
------ For reference only ---------------------------------- -----
landlord brother , can send the source code to me , ah, thank you want to learn
cnlag@qq.com
beyoyo@163.com
------ For reference only ----------------------------- ----------
can send source code to me , ah, want to learn thank ynljwcy@gmail.com
------ For reference only - -------------------------------------
chenghui_0317@163.com
------ For reference only ---------------------------------------
landlord good 1121655859 @ qq .. com ------ For reference only ---------------------------------------
above mailbox , LZ can no reference to a source , are learning framework
------ For reference only ----------------------------- ----------
send a landlord seeking the source to the mailbox , thank you
13981978030@163.com
------ For reference only ----------------------------- ----------
814983490@qq.com, with demand
------ For reference only ----------------- ----------------------
4221275@qq.com
just watching a video of it spring ~ ~
------ For reference only ------------------------- --------------
landlord to send a chant , pqchuang@163.com
------ For reference only --------- ------------------------------
seeking a source ! ! 826654664@qq.com
------ For reference only --------------------------------- ------
top landlord , seeking a source code , 1254777957@qq.com
------ For reference only -------------- -------------------------
want to learn , seeking source : 1946176242@qq.com
------ For reference only ---------------------------------------
issued < br> ------ For reference only ---------------------------------------
issued
------ For reference only ----------------------------- ----------
issued
------ For reference only ------------------- --------------------
issued
Thank you very much ! ! !
------ For reference only -------------------------------------- -
source you can send a landlord good life of peace !
------ For reference only -------------------------------------- -
landlord, a copy of the source code , look at your tree , dynamic additions and deletions . fjy931101@163.com
------ For reference only ------------------------------- --------
issued
------ For reference only --------------------- ------------------
source you can send a landlord good life of peace ! 516121616@qq.com
------ For reference only ------------------------------- --------
issued
------ For reference only --------------------- ------------------
landlord seeking a source to learn 1771515519@qq.com
------ For reference only ---------------------------------------
issued < br> ------ For reference only ---------------------------------------
123671949@qq.com good landlord
------ For reference only ---------------------------------------
issued < br> ------ For reference only ---------------------------------------
532742223@qq.com, landlord good
------ For reference only --------------------------- ------------
issued
------ For reference only ----------------- ----------------------
787601802@qq.com good landlord
------ For reference only ---------------------------------------
492438706@qq.com ; Thank you, landlord
------ For reference only ---------------------------------- -----
issued
------ For reference only ------------------------ ---------------
issued
------ For reference only -------------- -------------------------
landlord seeking good source 1037449725@qq.com
------ For reference only ---------------------------------------
issued < br> ------ For reference only ---------------------------------------
seeking lz code now learning , looking for a long time, thank you. 2637313911@qq.com
------ For reference only --------------------------------- ------
issued
------ For reference only ----------------------- ----------------
cattle b landlord sent me a copy of it is also my understanding of the framework too , and he had no active configuration plus QQ best 597494570@qq.com
------ For reference only --------------------------- ------------
issued
------ For reference only ----------------- ----------------------
273731580@qq.com seeking a source , thank landlord, learn about
------ For reference only ---------------------------------------
has fat
------ For reference only ------------------------------------- -
Please send me , thank you
zyh5540@163.com
------ For reference only ----------------------------- ----------
good, the interface is very beautiful yo.
------ For reference only -------------------------------------- -
iexwy@126.com seeking source
------ For reference only ---------------------------------- -----
lsl122576652@163.com landlord good , good life of peace , seeking the source, thank you !
------ For reference only -------------------------------------- -
landlord, you do nice demo , could trouble the landlord gave me a copy ? My mailbox is 1467477176@qq.com first thank you .....
------ For reference only ----------------- ----------------------
issued
------ For reference only ------- --------------------------------
issued
------ For reference only ---------------------------------------
has fat
------ For reference only ------------------------------------- -!
landlord really great guy , 3Q very much
------ For reference only ---------------------- -----------------
.
rude , learning together
------ For reference only ----------------------------- ----------
issued
good landlord, my mailbox , " wood " source code to receive your hair ah ! Is not the wrong mailbox ?
------ For reference only -------------------------------------- -
issued
good landlord, my mailbox , " wood " source code to receive your hair ah ! Is not the wrong mailbox ?
reissued
------ For reference only ------------------------------- --------
a copy to 0101wangsy@163.com Thank you.
------ For reference only -------------------------------------- -
oh well
------ For reference only ---------------------------------------
landlord fat source chant ! ! ! 1027060531@qq.com Thank
------ For reference only -------------------------------- -------
nice!!! seek source 515615321@qq.com 3 grams of oil ah
------ For reference only ------------------------------------ ---
synchronization source , longcpp@gmail.com
------ For reference only ------------------------ ---------------
witness , the landlord can send a copy of the source code, thank you ! 506669624@qq.com
------ For reference only --------------------------------- ------
landlord is a good man ah , seeking the source !
805182558@qq.com
------ For reference only ----------------------------- ----------
good landlord
1906439128@qq.com
------ For reference only ----------------------------- ----------
issued
------ For reference only ------------------- --------------------
issued
------ For reference only --------- ------------------------------
issued
------ For reference only ---------------------------------------
landlord please, send it, 948732473@qq.com
------ For reference only --------------------------------- ------
landlord good 2604521350@qq.com
------ For reference only -------------------- -------------------
issued
------ For reference only ---------- -----------------------------
issued
------ For reference only ---------------------------------------
issued
------ For reference only ---------------------------------- -----
landlord , you can send the next source it? 765656959@qq.com in this extremely grateful ! ! !
------ For reference only -------------------------------------- -
issued
------ For reference only ---------------------------- -----------
landlord , you can send the next source it? 494322596@qq.com in this extremely grateful ! ! !
------ For reference only -------------------------------------- -
issued
------ For reference only ---------------------------- -----------
landlord hello , I would like to learn next. 913221173@qq.com. Thank
------ For reference only ------------------------------------- -
issued
没有评论:
发表评论