欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

bootstrap+spring mvc+ibatis 实现增删改查

程序员文章站 2023-12-25 13:07:27
...

index.jsp

 

<!DOCTYPE html>

 

<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->

 

<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->

 

<!--[if !IE]><!-->

<html lang="en">

<!--<![endif]-->

 

<!-- BEGIN HEAD -->

<%@ page language="java" contentType="text/html; charset=UTF-8"

pageEncoding="UTF-8"%>

<%

String path1 = request.getContextPath();

String basePath1 = request.getScheme() + "://"

+ request.getServerName() + ":" + request.getServerPort()

+ path1 + "/";

%>

<head>

 

<title></title>

 

<meta content="width=device-width, initial-scale=1.0" name="viewport" />

 

<meta content="" name="description" />

 

<meta content="" name="author" />

 

<!-- BEGIN GLOBAL MANDATORY STYLES -->

 

<link href="media/css/bootstrap.min.css" rel="stylesheet"

type="text/css" />

 

<link href="media/css/bootstrap-responsive.min.css" rel="stylesheet"

type="text/css" />

 

<link href="media/css/font-awesome.min.css" rel="stylesheet"

type="text/css" />

 

<link href="media/css/style-metro.css" rel="stylesheet" type="text/css" />

 

<link href="media/css/style.css" rel="stylesheet" type="text/css" />

 

<link href="media/css/style-responsive.css" rel="stylesheet"

type="text/css" />

 

<link href="media/css/default.css" rel="stylesheet" type="text/css"

id="style_color" />

 

<link href="media/css/uniform.default.css" rel="stylesheet"

type="text/css" />

 

<!-- END GLOBAL MANDATORY STYLES -->

 

<!-- BEGIN PAGE LEVEL STYLES -->

 

<link rel="stylesheet" type="text/css"

href="media/css/select2_metro.css" />

 

<link rel="stylesheet" href="media/css/DT_bootstrap.css" />

 

<!-- END PAGE LEVEL STYLES -->

 

<link rel="shortcut icon" href="media/image/favicon.ico" />

 

<script type="text/javascript"

src="<%=basePath1%>static/js/admin/main.js"></script>

 

</head>

 

<!-- END HEAD -->

 

<!-- BEGIN BODY -->

 

<body class="page-header-fixed">

 

<!-- BEGIN HEADER -->

 

<div class="header navbar navbar-inverse navbar-fixed-top">

 

<!-- BEGIN TOP NAVIGATION BAR -->

 

<div class="navbar-inner">

 

<div class="container-fluid">

 

<!-- BEGIN LOGO -->

 

<a class="brand" href="index.html"> <img

src="media/image/logo.png" alt="logo" />

 

</a>

 

<!-- END LOGO -->

 

<!-- BEGIN RESPONSIVE MENU TOGGLER -->

 

<a href="javascript:;" class="btn-navbar collapsed"

data-toggle="collapse" data-target=".nav-collapse"> <img

src="media/image/menu-toggler.png" alt="" />

 

</a>

 

<!-- END RESPONSIVE MENU TOGGLER -->

 

<!-- BEGIN TOP NAVIGATION MENU -->

 

<ul class="nav pull-right">

 

<!-- BEGIN NOTIFICATION DROPDOWN -->

 

<li class="dropdown" id="header_notification_bar"><a href="#"

class="dropdown-toggle" data-toggle="dropdown"> <i

class="icon-warning-sign"></i> <span class="badge">6</span>

 

</a>

 

<ul class="dropdown-menu extended notification">

 

<li>

 

<p>You have 14 new notifications</p>

 

</li>

 

<li><a href="#"> <span class="label label-success"><i

class="icon-plus"></i></span> New user registered. <span class="time">Just

now</span>

 

</a></li>

 

<li><a href="#"> <span class="label label-important"><i

class="icon-bolt"></i></span> Server #12 overloaded. <span

class="time">15 mins</span>

 

</a></li>

 

<li><a href="#"> <span class="label label-warning"><i

class="icon-bell"></i></span> Server #2 not respoding. <span

class="time">22 mins</span>

 

</a></li>

 

<li><a href="#"> <span class="label label-info"><i

class="icon-bullhorn"></i></span> Application error. <span

class="time">40 mins</span>

 

</a></li>

 

<li><a href="#"> <span class="label label-important"><i

class="icon-bolt"></i></span> Database overloaded 68%. <span

class="time">2 hrs</span>

 

</a></li>

 

<li><a href="#"> <span class="label label-important"><i

class="icon-bolt"></i></span> 2 user IP blocked. <span class="time">5

hrs</span>

 

</a></li>

 

<li class="external"><a href="#">See all notifications <i

class="m-icon-swapright"></i></a></li>

 

</ul></li>

 

<!-- END NOTIFICATION DROPDOWN -->

 

<!-- BEGIN INBOX DROPDOWN -->

 

<li class="dropdown" id="header_inbox_bar"><a href="#"

class="dropdown-toggle" data-toggle="dropdown"> <i

class="icon-envelope"></i> <span class="badge">5</span>

 

</a>

 

<ul class="dropdown-menu extended inbox">

 

<li>

 

<p>You have 12 new messages</p>

 

</li>

 

<li><a href="inbox.html?a=view"> <span class="photo"><img

src="media/image/avatar2.jpg" alt="" /></span> <span class="subject">

 

<span class="from">Lisa Wong</span> <span class="time">Just

Now</span>

 

</span> <span class="message"> Vivamus sed auctor nibh congue

nibh. auctor nibh auctor nibh... </span>

 

</a></li>

 

<li><a href="inbox.html?a=view"> <span class="photo"><img

src="media/image/avatar3.jpg" alt="" /></span> <span class="subject">

 

<span class="from">Richard Doe</span> <span class="time">16

mins</span>

 

</span> <span class="message"> Vivamus sed congue nibh auctor

nibh congue nibh. auctor nibh auctor nibh... </span>

 

</a></li>

 

<li><a href="inbox.html?a=view"> <span class="photo"><img

src="media/image/avatar1.jpg" alt="" /></span> <span class="subject">

 

<span class="from">Bob Nilson</span> <span class="time">2

hrs</span>

 

</span> <span class="message"> Vivamus sed nibh auctor nibh

congue nibh. auctor nibh auctor nibh... </span>

 

</a></li>

 

<li class="external"><a href="inbox.html">See all

messages <i class="m-icon-swapright"></i>

</a></li>

 

</ul></li>

 

<!-- END INBOX DROPDOWN -->

 

<!-- BEGIN TODO DROPDOWN -->

 

<li class="dropdown" id="header_task_bar"><a href="#"

class="dropdown-toggle" data-toggle="dropdown"> <i

class="icon-tasks"></i> <span class="badge">5</span>

 

</a>

 

<ul class="dropdown-menu extended tasks">

 

<li>

 

<p>You have 12 pending tasks</p>

 

</li>

 

<li><a href="#"> <span class="task"> <span

class="desc">New release v1.2</span> <span class="percent">30%</span>

 

</span> <span class="progress progress-success "> <span

style="width: 30%;" class="bar"></span>

 

</span>

 

</a></li>

 

<li><a href="#"> <span class="task"> <span

class="desc">Application deployment</span> <span

class="percent">65%</span>

 

</span> <span class="progress progress-danger progress-striped active">

 

<span style="width: 65%;" class="bar"></span>

 

</span>

 

</a></li>

 

<li><a href="#"> <span class="task"> <span

class="desc">Mobile app release</span> <span class="percent">98%</span>

 

</span> <span class="progress progress-success"> <span

style="width: 98%;" class="bar"></span>

 

</span>

 

</a></li>

 

<li><a href="#"> <span class="task"> <span

class="desc">Database migration</span> <span class="percent">10%</span>

 

</span> <span class="progress progress-warning progress-striped">

 

<span style="width: 10%;" class="bar"></span>

 

</span>

 

</a></li>

 

<li><a href="#"> <span class="task"> <span

class="desc">Web server upgrade</span> <span class="percent">58%</span>

 

</span> <span class="progress progress-info"> <span

style="width: 58%;" class="bar"></span>

 

</span>

 

</a></li>

 

<li><a href="#"> <span class="task"> <span

class="desc">Mobile development</span> <span class="percent">85%</span>

 

</span> <span class="progress progress-success"> <span

style="width: 85%;" class="bar"></span>

 

</span>

 

</a></li>

 

<li class="external"><a href="#">See all tasks <i

class="m-icon-swapright"></i></a></li>

 

</ul></li>

 

<!-- END TODO DROPDOWN -->

 

<!-- BEGIN USER LOGIN DROPDOWN -->

 

<li class="dropdown user"><a href="#" class="dropdown-toggle"

data-toggle="dropdown"> <img alt=""

src="media/image/avatar1_small.jpg" /> <span class="username">Bob

Nilson</span> <i class="icon-angle-down"></i>

 

</a>

 

<ul class="dropdown-menu">

 

<li><a href="extra_profile.html"><i class="icon-user"></i>

My Profile</a></li>

 

<li><a href="page_calendar.html"><i

class="icon-calendar"></i> My Calendar</a></li>

 

<li><a href="inbox.html"><i class="icon-envelope"></i>

My Inbox(3)</a></li>

 

<li><a href="#"><i class="icon-tasks"></i> My Tasks</a></li>

 

<li class="divider"></li>

 

<li><a href="extra_lock.html"><i class="icon-lock"></i>

Lock Screen</a></li>

 

<li><a href="login.html"><i class="icon-key"></i> Log

Out</a></li>

 

</ul></li>

 

<!-- END USER LOGIN DROPDOWN -->

 

</ul>

 

<!-- END TOP NAVIGATION MENU -->

 

</div>

 

</div>

 

<!-- END TOP NAVIGATION BAR -->

 

</div>

 

<!-- END HEADER -->

 

<!-- BEGIN CONTAINER -->

 

<div class="page-container row-fluid">

 

<!-- BEGIN SIDEBAR -->

 

<div class="page-sidebar nav-collapse collapse">

 

<!-- BEGIN SIDEBAR MENU -->

 

<ul class="page-sidebar-menu">

 

<li>

<!-- BEGIN SIDEBAR TOGGLER BUTTON -->

 

<div class="sidebar-toggler hidden-phone"></div> <!-- BEGIN SIDEBAR TOGGLER BUTTON -->

 

</li>

 

<li>

<!-- BEGIN RESPONSIVE QUICK SEARCH FORM -->

 

<form class="sidebar-search">

 

<div class="input-box">

 

<a href="javascript:;" class="remove"></a> <input type="text"

placeholder="Search..." /> <input type="button" class="submit"

value=" " />

 

</div>

 

</form> <!-- END RESPONSIVE QUICK SEARCH FORM -->

 

</li>

 

<li class="start "><a href="index.html"> <i

class="icon-home"></i> <span class="title">Dashboard</span>

 

</a></li>

 

<li class="start "><a href="javascript:void(0);"

onclick="createFrame('paraConf.jsp');"> <i class="icon-home"></i>

 

<span class="title">参数配置</span>

 

</a></li>

 

 

<li class="start "><a href="javascript:void(0);"

onclick="createFrame('parameterItems.jsp');"> <i

class="icon-home"></i> <span class="title">参数项配置</span>

 

</a></li>

 

<li class="start "><a href="javascript:void(0);"

onclick="createFrame1('test2.jsp');"> <i class="icon-home"></i>

 

<span class="title">参数项配置test</span>

 

</a></li>

 

 

 

 

<li class=""><a href="javascript:;"> <i class="icon-cogs"></i>

 

<span class="title">Layouts</span> <span class="arrow "></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="layout_horizontal_sidebar_menu.html">

 

Horzontal & Sidebar Menu</a></li>

 

<li><a href="layout_horizontal_menu1.html"> Horzontal

Menu 1</a></li>

 

<li><a href="layout_horizontal_menu2.html"> Horzontal

Menu 2</a></li>

 

<li><a href="layout_promo.html"> Promo Page</a></li>

 

<li><a href="layout_email.html"> Email Templates</a></li>

 

<li><a href="layout_ajax.html"> Content Loading via Ajax</a>

 

</li>

 

<li><a href="layout_sidebar_closed.html"> Sidebar Closed

Page</a></li>

 

<li><a href="layout_blank_page.html"> Blank Page</a></li>

 

<li><a href="layout_boxed_page.html"> Boxed Page</a></li>

 

<li><a href="layout_boxed_not_responsive.html">

 

Non-Responsive Boxed Layout</a></li>

 

</ul></li>

 

<li class=""><a href="javascript:;"> <i

class="icon-bookmark-empty"></i> <span class="title">UI

Features</span> <span class="arrow "></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="ui_general.html"> General</a></li>

 

<li><a href="ui_buttons.html"> Buttons</a></li>

 

<li><a href="ui_modals.html"> Enhanced Modals</a></li>

 

<li><a href="ui_tabs_accordions.html"> Tabs & Accordions</a>

 

</li>

 

<li><a href="ui_jqueryui.html"> jQuery UI Components</a></li>

 

<li><a href="ui_sliders.html"> Sliders</a></li>

 

<li><a href="ui_tiles.html"> Tiles</a></li>

 

<li><a href="ui_typography.html"> Typography</a></li>

 

<li><a href="ui_tree.html"> Tree View</a></li>

 

<li><a href="ui_nestable.html"> Nestable List</a></li>

 

</ul></li>

 

<li class=""><a href="javascript:;"> <i class="icon-table"></i>

 

<span class="title">Form Stuff</span> <span class="arrow "></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="form_layout.html"> Form Layouts</a></li>

 

<li><a href="form_samples.html"> Advance Form Samples</a></li>

 

<li><a href="form_component.html"> Form Components</a></li>

 

<li><a href="form_wizard.html"> Form Wizard</a></li>

 

<li><a href="form_validation.html"> Form Validation</a></li>

 

<li><a href="form_fileupload.html"> Multiple File Upload</a>

 

</li>

 

<li><a href="form_dropzone.html"> Dropzone File Upload</a></li>

 

</ul></li>

 

<li class=""><a href="javascript:;"> <i

class="icon-briefcase"></i> <span class="title">Pages</span> <span

class="arrow "></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="page_timeline.html"> <i class="icon-time"></i>

 

Timeline

</a></li>

 

<li><a href="page_coming_soon.html"> <i class="icon-cogs"></i>

Coming Soon

</a></li>

 

<li><a href="page_blog.html"> <i class="icon-comments"></i>

 

Blog

</a></li>

 

<li><a href="page_blog_item.html"> <i class="icon-font"></i>

 

Blog Post

</a></li>

 

<li><a href="page_news.html"> <i class="icon-coffee"></i>

 

News

</a></li>

 

<li><a href="page_news_item.html"> <i class="icon-bell"></i>

 

News View

</a></li>

 

<li><a href="page_about.html"> <i class="icon-group"></i>

 

About Us

</a></li>

 

<li><a href="page_contact.html"> <i

class="icon-envelope-alt"></i> Contact Us

</a></li>

 

<li><a href="page_calendar.html"> <i

class="icon-calendar"></i> Calendar

</a></li>

 

</ul></li>

 

<li class=""><a href="javascript:;"> <i class="icon-gift"></i>

 

<span class="title">Extra</span> <span class="arrow "></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="extra_profile.html"> User Profile</a></li>

 

<li><a href="extra_lock.html"> Lock Screen</a></li>

 

<li><a href="extra_faq.html"> FAQ</a></li>

 

<li><a href="inbox.html"> Inbox</a></li>

 

<li><a href="extra_search.html"> Search Results</a></li>

 

<li><a href="extra_invoice.html"> Invoice</a></li>

 

<li><a href="extra_pricing_table.html"> Pricing Tables</a></li>

 

<li><a href="extra_image_manager.html"> Image Manager</a></li>

 

<li><a href="extra_404_option1.html"> 404 Page Option 1</a></li>

 

<li><a href="extra_404_option2.html"> 404 Page Option 2</a></li>

 

<li><a href="extra_404_option3.html"> 404 Page Option 3</a></li>

 

<li><a href="extra_500_option1.html"> 500 Page Option 1</a></li>

 

<li><a href="extra_500_option2.html"> 500 Page Option 2</a></li>

 

</ul></li>

 

<li><a class="active" href="javascript:;"> <i

class="icon-sitemap"></i> <span class="title">3 Level Menu</span>

 

<span class="arrow "></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="javascript:;"> Item 1 <span class="arrow"></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="#">Sample Link 1</a></li>

 

<li><a href="#">Sample Link 2</a></li>

 

<li><a href="#">Sample Link 3</a></li>

 

</ul></li>

 

<li><a href="javascript:;"> Item 1 <span class="arrow"></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="#">Sample Link 1</a></li>

 

<li><a href="#">Sample Link 1</a></li>

 

<li><a href="#">Sample Link 1</a></li>

 

</ul></li>

 

<li><a href="#"> Item 3 </a></li>

 

</ul></li>

 

<li><a href="javascript:;"> <i class="icon-folder-open"></i>

 

<span class="title">4 Level Menu</span> <span class="arrow "></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="javascript:;"> <i class="icon-cogs"></i>

 

Item 1 <span class="arrow"></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="javascript:;"> <i class="icon-user"></i>

 

Sample Link 1 <span class="arrow"></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="#"><i class="icon-remove"></i> Sample

Link 1</a></li>

 

<li><a href="#"><i class="icon-pencil"></i> Sample

Link 1</a></li>

 

<li><a href="#"><i class="icon-edit"></i> Sample Link

1</a></li>

 

</ul></li>

 

<li><a href="#"><i class="icon-user"></i> Sample Link 1</a></li>

 

<li><a href="#"><i class="icon-external-link"></i>

Sample Link 2</a></li>

 

<li><a href="#"><i class="icon-bell"></i> Sample Link 3</a></li>

 

</ul></li>

 

<li><a href="javascript:;"> <i class="icon-globe"></i>

 

Item 2 <span class="arrow"></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="#"><i class="icon-user"></i> Sample Link 1</a></li>

 

<li><a href="#"><i class="icon-external-link"></i>

Sample Link 1</a></li>

 

<li><a href="#"><i class="icon-bell"></i> Sample Link 1</a></li>

 

</ul></li>

 

<li><a href="#"> <i class="icon-folder-open"></i> Item 3

 

</a></li>

 

</ul></li>

 

<li class=""><a href="javascript:;"> <i class="icon-user"></i>

 

<span class="title">Login Options</span> <span class="arrow "></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="login.html"> Login Form 1</a></li>

 

<li><a href="login_soft.html"> Login Form 2</a></li>

 

</ul></li>

 

<li class="active "><a href="javascript:;"> <i

class="icon-th"></i> <span class="title">Data Tables</span> <span

class="selected"></span> <span class="arrow open"></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="table_basic.html"> Basic Tables</a></li>

 

<li><a href="table_responsive.html"> Responsive Tables</a></li>

 

<li class="active"><a href="table_managed.html"> Managed

Tables</a></li>

 

<li><a href="table_editable.html"> Editable Tables</a></li>

 

<li><a href="table_advanced.html"> Advanced Tables</a></li>

 

</ul></li>

 

<li class=""><a href="javascript:;"> <i

class="icon-file-text"></i> <span class="title">Portlets</span> <span

class="arrow "></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="portlet_general.html"> General Portlets</a></li>

 

<li><a href="portlet_draggable.html"> Draggable Portlets</a>

 

</li>

 

</ul></li>

 

<li class=""><a href="javascript:;"> <i

class="icon-map-marker"></i> <span class="title">Maps</span> <span

class="arrow "></span>

 

</a>

 

<ul class="sub-menu">

 

<li><a href="maps_google.html"> Google Maps</a></li>

 

<li><a href="maps_vector.html"> Vector Maps</a></li>

 

</ul></li>

 

<li class="last "><a href="charts.html"> <i

class="icon-bar-chart"></i> <span class="title">Visual

Charts</span>

 

</a></li>

 

</ul>

 

<!-- END SIDEBAR MENU -->

 

</div>

 

<!-- END SIDEBAR -->

 

 

<!-- BEGIN PAGE -->

 

<div class="page-content">

 

<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->

 

<div id="portlet-config" class="modal hide">

 

<div class="modal-header">

 

<button data-dismiss="modal" class="close" type="button"></button>

 

<h3>portlet Settings</h3>

 

</div>

 

<div class="modal-body">

 

<p>Here will be a configuration form</p>

 

</div>

 

</div>

 

<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->

 

<!-- BEGIN PAGE CONTAINER-->

 

<!--<jsp:include page="test.jsp"  flush="true" /> -->

 

<div>

<jsp:include page="media/jsp/test1.jsp" flush="true" />

</div>

 

<iframe id="mainFrame" src="media/jsp/paraConf.jsp" scrolling="auto"

frameborder="0" style="width: 100%; height: 600px;"> </iframe>

 

 

<%--<%@ include file="paraConf1.jsp" %>  --%>

 

 

 

<!-- END PAGE CONTAINER-->

 

</div>

 

<!-- END PAGE -->

 

</div>

 

<!-- END CONTAINER -->

 

<!-- BEGIN FOOTER -->

 

<div class="footer">

 

<div class="footer-inner">2013 &copy; Metronic by keenthemes.</div>

 

<div class="footer-tools">

 

<span class="go-top"> <i class="icon-angle-up"></i>

 

</span>

 

</div>

 

</div>

 

<!-- END FOOTER -->

 

<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->

 

<!-- BEGIN CORE PLUGINS -->

 

<script src="media/js/jquery-1.10.1.min.js" type="text/javascript"></script>

 

<script src="media/js/jquery-migrate-1.2.1.min.js"

type="text/javascript"></script>

 

<!-- IMPORTANT! Load jquery-ui-1.10.1.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->

 

<script src="media/js/jquery-ui-1.10.1.custom.min.js"

type="text/javascript"></script>

 

<script src="media/js/bootstrap.min.js" type="text/javascript"></script>

 

<!--[if lt IE 9]>

 

<script src="media/js/excanvas.min.js"></script>

 

<script src="media/js/respond.min.js"></script>  

 

<![endif]-->

 

<script src="media/js/jquery.slimscroll.min.js" type="text/javascript"></script>

 

<script src="media/js/jquery.blockui.min.js" type="text/javascript"></script>

 

<script src="media/js/jquery.cookie.min.js" type="text/javascript"></script>

 

<script src="media/js/jquery.uniform.min.js" type="text/javascript"></script>

 

<!-- END CORE PLUGINS -->

 

<!-- BEGIN PAGE LEVEL PLUGINS -->

 

<script type="text/javascript" src="media/js/select2.min.js"></script>

 

<script type="text/javascript" src="media/js/jquery.dataTables.js"></script>

 

<script type="text/javascript" src="media/js/DT_bootstrap.js"></script>

 

<!-- END PAGE LEVEL PLUGINS -->

 

<!-- BEGIN PAGE LEVEL SCRIPTS -->

 

<script src="media/js/app.js"></script>

 

<!--<script src="media/js/table-managed.js"></script> -->

 

<script src="media/js/table-editable.js"></script>

 

 

<script>

 

jQuery(document).ready(function() {       

 

  App.init();

 

  TableManaged.init();

//   UIModals.init();

  TableEditable.init();

});

 

</script>

 

</body>

 

 

<script type="text/javascript">

      var nRow1;

      var edit="";

      var oTable;

      load();

      function load() {      

      if (oTable) {          

       oTable.fnDestroy();  

          }          

        oTable=$("#sample_1").dataTable({    

       "bPaginate": true, 

"bProcessing" : true,

"bServerSide" : true,

"bSort" : true,

"oSearch" : { "sSearch": "", "bRegex": false, "bSmart": false },

    "sPaginationType": "bootstrap",

"sAjaxSource" : "/admin/getParaConfList1",

             "aoColumns": [ 

                           { "mData": null }, 

                           { "mData": "cfgGroupCode"}, 

                           { "mData": "cfgGroupName"}  ,

                           { }          

                       ] ,  

            "aoColumnDefs": [{            

            "aTargets": [0],        

            "sClass1": "btn red",            

            "bSortable": false,         

            "mData": null,

            "mRender": function(data, type, full) { 

                    return'<input type="checkbox" class="checkboxes" value="1" />' 

                        }

           },

        {  "aTargets": [3],   

              "bSortable": true,  

               "mData": function(){return '<a class="edit"  data-toggle="modal" href="#responsive">编辑</a>'  +"&nbsp;&nbsp;&nbsp;&nbsp;"+'<a class="delete" href="javascript:;">删除</a>'  }      

              } ] ,

              

   }

   )  

       

      }

   

      $('#cfgNew').live('click', function (e) {

                e.preventDefault();       

                $("#cfgGroupName2").val('');

                $("#cfgGroupCode2").val('');     

            });

   

 

            $('#sample_1 a.edit').live('click', function (e) {

                e.preventDefault();         

                var nRow = $(this).parents('tr')[0];    

                nRow1=nRow;

                edit="1";

                aData = oTable.fnGetData( nRow);             

                $("#cfgGroupName2").val(aData.cfgGroupName);

                $("#cfgGroupCode2").val(aData.cfgGroupCode);     

            });

 

 

      $('#sample_1 a.delete').live('click', function (e) {

                e.preventDefault();       

                if (confirm("你真的要删除该条记录吗?") == false) {

                    return;

                }                

                

                var nRow2 = $(this).parents('tr')[0];                

                aData = oTable.fnGetData(nRow2);      

                var id= aData.cfgGroupCode;   

             

            $.ajax({

type : "post",

url : "admin/delParaConf",

data : {

cfgGroupCode :id

},

success : function(data) {

if (data == "success") {

load();

alert("删除成功");

 

} else {

alert("删除失败");

}

}

});

            //   oTable.fnDeleteRow(nRow2);

            //   

        //   oTable.fnDraw();      

                });

 

   jQuery('#sample_1 .group-checkable').change(function () {

                var set = jQuery(this).attr("data-set");

                var checked = jQuery(this).is(":checked");

                jQuery(set).each(function () {

                    if (checked) {

                        $(this).attr("checked", true);

                    } else {

                        $(this).attr("checked", false);

                    }

                });

                jQuery.uniform.update(set);

            });  

       

   

       function saveConf1() {

     var strCode="";

     strCode=$("#cfgGroupCode2").val(); 

 

  var strVal=$("#cfgGroupName2").val();        

  if (strVal == "" || strVal == null || strVal == "undefined" ) {

   $("#myDiv").html( "参数配置名称不能为空值");

    //   alert("提示信息", "参数配置名称不能为空值");

  return;

  }      

 

    htmlobj=$.ajax({url:"/admin/addParaConf1?cfgGroupCode="+strCode+"&cfgGroupName="+strVal    ,async:false});   

    result=htmlobj.responseText;

    

    $("#myDiv").html( "");

 if (result == "success") {

   $("#myDiv").html( "保存成功");      

 if (edit == "1") {oTable.fnUpdate(strVal, nRow1, 2, false); edit =''}    

 else  oTable.fnDraw();

  } 

else  if (result == "existed") {

//$.messager.alert("提示信息", "参数配置名称已经存在!");

 $("#myDiv").html("参数配置名称已经存在!");

return;

}

else {

 $("#myDiv").html("系统错误,请稍后再试!");

}  

         }      

       

       

       

       $(document).ready(function(){

         $("#b01").click(function(){

         htmlobj=$.ajax({url:"/jquery/test1.txt",async:false});

         $("#myDiv").html(htmlobj.responseText);

         });

      });

              

       

</script>

 

 

<!-- END BODY -->

 

</html>

 

 

 

 

test1.jsp

 

<%@ page language="java" contentType="text/html; charset=UTF-8"

pageEncoding="UTF-8"%>

 

<div class="container-fluid">

 

<!-- BEGIN PAGE HEADER-->

 

<div class="row-fluid">

 

<div class="span12">

 

<!-- BEGIN STYLE CUSTOMIZER -->

 

<div class="color-panel hidden-phone">

 

<div class="color-mode-icons icon-color"></div>

 

<div class="color-mode-icons icon-color-close"></div>

 

<div class="color-mode">

 

<p>THEME COLOR</p>

 

<ul class="inline">

 

<li class="color-black current color-default" data-style="default"></li>

 

<li class="color-blue" data-style="blue"></li>

 

<li class="color-brown" data-style="brown"></li>

 

<li class="color-purple" data-style="purple"></li>

 

<li class="color-grey" data-style="grey"></li>

 

<li class="color-white color-light" data-style="light"></li>

 

</ul>

 

<label> <span>Layout</span> <select

class="layout-option m-wrap small">

 

<option value="fluid" selected>Fluid</option>

 

<option value="boxed">Boxed</option>

 

</select>

 

</label> <label> <span>Header</span> <select

class="header-option m-wrap small">

 

<option value="fixed" selected>Fixed</option>

 

<option value="default">Default</option>

 

</select>

 

</label> <label> <span>Sidebar</span> <select

class="sidebar-option m-wrap small">

 

<option value="fixed">Fixed</option>

 

<option value="default" selected>Default</option>

 

</select>

 

</label> <label> <span>Footer</span> <select

class="footer-option m-wrap small">

 

<option value="fixed">Fixed</option>

 

<option value="default" selected>Default</option>

 

</select>

 

</label>

 

</div>

 

</div>

 

<!-- END BEGIN STYLE CUSTOMIZER -->

 

<!-- BEGIN PAGE TITLE & BREADCRUMB-->

 

<h3 class="page-title">

 

工具管理系统 <small>参数配置</small>

 

</h3>

 

<ul class="breadcrumb">

 

<li><i class="icon-home"></i> <a href="index.html">首页</a> <i

class="icon-angle-right"></i></li>

 

<li><a href="#">参数配置</a> <i class="icon-angle-right"></i></li>

 

 

 

</ul>

 

<!-- END PAGE TITLE & BREADCRUMB-->

 

</div>

 

</div>

 

<!-- END PAGE HEADER-->

 

<!-- BEGIN PAGE CONTENT-->

 

<div class="row-fluid">

 

<div class="span12">

 

<!-- BEGIN EXAMPLE TABLE PORTLET-->

 

<div class="portlet box light-grey">

 

<div class="portlet-title">

 

<div class="caption">

<i class="icon-globe"></i>参数配置管理

</div>

 

<div class="tools">

 

<a href="javascript:;" class="collapse"></a> <a

href="#portlet-config" data-toggle="modal" class="config"></a> <a

href="javascript:;" class="reload"></a> <a href="javascript:;"

class="remove"></a>

 

</div>

 

</div>

 

<div class="portlet-body">

 

<div class="clearfix">

 

<a class="btn blue"  id="cfgNew"  data-toggle="modal" href="#responsive">新增</a>

 

<div class="btn-group pull-right">

 

<button class="btn dropdown-toggle" data-toggle="dropdown">

Tools <i class="icon-angle-down"></i>

 

</button>

 

<ul class="dropdown-menu pull-right">

 

<li><a href="#">Print</a></li>

 

<li><a href="#">Save as PDF</a></li>

 

<li><a href="#">Export to Excel</a></li>

 

</ul>

 

</div>

 

</div>

 

<table class="table table-striped table-bordered table-hover"

id="sample_1">

 

<thead>

 

<tr>

 

<th style="width:18px;"><input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes" /></th>

   <th>ID</th>

<th>参数配置名称</th>

                           <th>操作</th>

</tr>

 

</thead>

 

<tbody>

 

 

</tbody>

 

</table>

 

</div>

 

</div>

 

<!-- END EXAMPLE TABLE PORTLET-->

 

</div>

 

</div>

 

 

<!-- END PAGE CONTENT-->

 

</div>

 

 

 

<div id="responsive" class="modal hide fade" tabindex="-1"

data-width="260">

 

<div class="modal-header">

 

<button type="button" class="close" data-dismiss="modal"

aria-hidden="true"></button>

 

<h3>参数配置</h3>

 

</div>

 

<div class="modal-body">

 

<div class="row-fluid">

 

<div class="span6">

 

<h4>参数配置名称</h4>

 

<p>

<input name="cfgGroupCode2"  id="cfgGroupCode2"   type="hidden"  class="span12 m-wrap">

<input name="cfgGroupName2"  id="cfgGroupName2"  type="text" class="span12 m-wrap">

<label id="myDiv"  class="control-label"></label>

 

</p>

 

</div>

 

 

</div>

 

</div>

 

<div class="modal-footer">

     

<button type="button" data-dismiss="modal" class="btn">关闭</button>

 

   <a href="javascript:saveConf1();" class="btn blue" id="test123">保存</a>

 

</div>

 

</div>

 

 

ParaConfController.java

 

package com.gy.inventory.controller;

 

import java.util.HashMap;

import java.util.List;

import java.util.Map;

 

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

 

import net.sf.json.JSONObject;

 

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.ModelAttribute;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;

import org.springframework.web.servlet.ModelAndView;

 

import com.gy.inventory.model.ParaConfigGroup;

import com.gy.inventory.service.ParaConfService;

 

 

@Controller

@RequestMapping("/admin")

public class ParaConfController {

 

@Autowired

private ParaConfService paraConfService;

 

@RequestMapping("/getParaConfList")

@ResponseBody

public Map<String, Object> searchPrepayPage(String cfgGroupName,

Integer page, Integer rows) {// 蓝色的就是你在ajax提交的时候传递的数据

// 设置当前页

int intPage = page == null || page <= 0 ? 1 : page;

// 设置每页显示的数量:

int intPageSize = rows == null || rows <= 0 ? 10 : rows;

 

int size = paraConfService.getQueryCounts(cfgGroupName).size();

 

List<ParaConfigGroup> list = queryPrepayPageList(cfgGroupName,

intPage, intPageSize);// 传进去的page要进行处理

 

if (list != null) {

Map<String, Object> result = new HashMap<String, Object>();

result.put("total", size);

result.put("rows", list);

return result;

}

return null;

}

 

 

 

 

public List<ParaConfigGroup> queryPrepayPageList(String cfgGroupName, Integer pageNo, Integer pageSize) {

Integer firstRow = 1;

if (pageNo != null && pageSize != null) {

pageNo = pageNo < 1 ? 1 : pageNo;

pageSize = pageSize < 1 ? 10 : pageSize; 

int firstRow1 = (pageNo - 1) * pageSize;

firstRow = firstRow1;

}

 

return paraConfService.getParaConfList(cfgGroupName, firstRow,

pageSize);

}

 

 

@RequestMapping("/getParaConfList1")

@ResponseBody

public JSONObject searchPrepayPage1(String cfgGroupName,

Integer start, Integer length, HttpServletRequest request) {

    start=Integer.parseInt(request.getParameter("iDisplayStart"));

length=Integer.parseInt(request.getParameter("iDisplayLength"));

cfgGroupName=request.getParameter("sSearch");

    int size = paraConfService.getQueryCounts(cfgGroupName).size();

JSONObject list =  paraConfService.getParaConfList1(cfgGroupName, start, length);

 

list.put("iTotalRecords", size);

   list.put("iTotalDisplayRecords", size);

   

return list;

}

 

@RequestMapping(value = "/getParaConfJsp")

public ModelAndView getParaConf(HttpServletRequest request,

HttpServletResponse response) {

return new ModelAndView("admin/paraConf");

}

 

@RequestMapping("/addParaConf")

@ResponseBody

public String addConfName(@ModelAttribute ParaConfigGroup conf,String cfgGroupName1) {

 

if (cfgGroupName1!=""){

int size = paraConfService.getQueryCounts(cfgGroupName1).size();

if (size>0 ) return "existed";

else conf.setCfgGroupName(cfgGroupName1);

}

 

int  result= paraConfService.addParaConf(conf);

if (result == 1) 

return "success";

else

return "null";

}

 

 

@RequestMapping("/addParaConf1")

@ResponseBody

public String addConfName1(@ModelAttribute ParaConfigGroup conf,String cfgGroupName1,HttpServletRequest request) {

 

conf.setCfgGroupCode(request.getParameter("cfgGroupCode"));

cfgGroupName1=request.getParameter("cfgGroupName");

 

 

if (cfgGroupName1!=""){

int size = paraConfService.getQueryCounts(cfgGroupName1).size();

if (size>0 ) return "existed";

else conf.setCfgGroupName(cfgGroupName1);

}

 

int  result= paraConfService.addParaConf(conf);

if (result == 1) 

return "success";

else

return "null";

}

 

 

 

 

@RequestMapping("/delParaConf")

@ResponseBody

public String delConfName(String  cfgGroupCode) {

int result=paraConfService.delParaConf(cfgGroupCode);

if (result == 1) 

return "success";

else

return "null";

}

 

 

@RequestMapping("/getParaConfName")

@ResponseBody

public String  getParaConfName() {

return "success";

}

 

 

}

 

 

 

 

ParaConfService.java

 

package com.gy.inventory.service;

 

import java.util.List;

 

import net.sf.json.JSONObject;

 

import com.gy.inventory.model.ParaConfigGroup;

 

 

public interface ParaConfService {

 

public List<ParaConfigGroup>  getQueryCounts(String confName);

 

public List<ParaConfigGroup> getParaConfList(String confName,Integer firstRow, Integer rowSizey);

 

public int addParaConf(ParaConfigGroup conf);

 

public int updateParaConf(ParaConfigGroup conf);

 

public int delParaConf(String id);

 

JSONObject getParaConfList1(String confName, Integer firstRow,

Integer rowSize);

 

}

 

 

 

ParaConfServiceImpl.java

 

package com.gy.inventory.service.impl;

 

import java.util.Collection;

import java.util.List;

 

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;

import com.gy.inventory.mapper.ParaConfMapper;

import com.gy.inventory.model.ParaConfigGroup;

import com.gy.inventory.service.ParaConfService;

 

import net.sf.ezmorph.Morpher;

import net.sf.ezmorph.MorpherRegistry;

import net.sf.ezmorph.bean.BeanMorpher;

import net.sf.json.JSONArray;

import net.sf.json.JSONObject;

import net.sf.json.util.JSONUtils;

 

 

@Service

public class ParaConfServiceImpl implements ParaConfService {

 

@Autowired

private ParaConfMapper paraConfMapper;

 

@Override

public List<ParaConfigGroup> getQueryCounts(String confName) {

 

List<ParaConfigGroup> result = paraConfMapper.getQueryCounts(confName);

 

return result;

}

 

@Override

public List<ParaConfigGroup> getParaConfList(String confName,

Integer firstRow, Integer rowSize) {

List<ParaConfigGroup> result = paraConfMapper.getParaConfList(confName,

firstRow, rowSize);

return result;

}

 

@Override

public JSONObject getParaConfList1(String confName, Integer firstRow,

Integer rowSize) {

 

List<ParaConfigGroup> result = paraConfMapper.getParaConfList(confName,

firstRow, rowSize);

 

JSONArray jsonobj = JSONArray.fromObject(result);

JSONObject returnjobj = new JSONObject();

returnjobj.put("aaData",  jsonobj );

return returnjobj;

 

}

 

@Override

public int addParaConf(ParaConfigGroup conf) {

int result = 0;

if (conf.getCfgGroupCode().isEmpty())

result = paraConfMapper.addParaConf(conf);

else

result = paraConfMapper.updateParaConf(conf);

return result;

}

 

@Override

public int updateParaConf(ParaConfigGroup conf) {

 

int result = paraConfMapper.updateParaConf(conf);

 

return result;

}

 

@Override

public int delParaConf(String id) {

 

int result = paraConfMapper.delParaConf(id);

 

return result;

}

 

}

 

 

 

 

ParaConfMapper.java

 

 

 

package com.gy.inventory.mapper;

 

import java.util.List;

 

import org.apache.ibatis.annotations.Param;

 

import com.gy.inventory.model.ParaConfigGroup;

 

 

public interface ParaConfMapper {

 

public List<ParaConfigGroup> getQueryCounts(

@Param(value = "cfgGroupName") String paraName);

 

public List<ParaConfigGroup> getParaConfList(

@Param(value = "cfgGroupName") String cfgGroupName,

@Param(value = "firstRow") Integer firstRow,

@Param(value = "rowSize") Integer rowSize);

 

public int addParaConf(@Param(value = "cfg")ParaConfigGroup cfg);

 

public int updateParaConf(@Param(value = "cfg")ParaConfigGroup cfg);

 

public int delParaConf(@Param(value = "cfgGroupCode")String cfgGroupCode);

 

 

}

 

 

 

 

ParaConfMapper.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.gy.inventory.mapper.ParaConfMapper">

<resultMap type="ParaConfigGroup" id="paraConfViewResultMap">

<result column="INVENTORY_CFG_GROUP_CODE_ID" property="cfgGroupCode" />

<result column="CFGGROUPNAME" property="cfgGroupName" />

</resultMap>

 

<select id="getQueryCounts" resultMap="paraConfViewResultMap">

SELECT

INVENTORY_CFG_GROUP_CODE_ID,

CFGGROUPNAME

FROM T_INVENTORY_PARA_CONFIG_GROUP

WHERE 1 = 1

 

<if test="cfgGroupName != null and cfgGroupName != ''">

 and CFGGROUPNAME = #{cfgGroupName}

</if>

</select>

 

<select id="getParaConfList" resultMap="paraConfViewResultMap">

SELECT

INVENTORY_CFG_GROUP_CODE_ID,

CFGGROUPNAME

FROM T_INVENTORY_PARA_CONFIG_GROUP g

WHERE 1 = 1

 

<if test="cfgGroupName != null and cfgGroupName != ''">

     and CFGGROUPNAME = #{cfgGroupName}

</if>

<if test="firstRow != null and  rowSize != null">

             <![CDATA[ limit  #{firstRow},#{rowSize} ]]>

</if>

</select>

 

<insert id="addParaConf" useGeneratedKeys="true" parameterType="ParaConfigGroup">

INSERT INTO T_INVENTORY_PARA_CONFIG_GROUP

(CFGGROUPNAME

)

VALUES

(

#{cfg.cfgGroupName}

)

</insert>

 

<update id="updateParaConf" parameterType="ParaConfigGroup">

UPDATE

T_INVENTORY_PARA_CONFIG_GROUP

SET

CFGGROUPNAME = #{cfg.cfgGroupName}

WHERE INVENTORY_CFG_GROUP_CODE_ID = #{cfg.cfgGroupCode}

</update>

 

<delete id="delParaConf" parameterType="java.lang.String"

flushCache="true">

delete from T_INVENTORY_PARA_CONFIG_GROUP

where INVENTORY_CFG_GROUP_CODE_ID =

#{cfgGroupCode}

</delete>

 

</mapper> 

 

 

 

 

 

 

 

 

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:aop="http://www.springframework.org/schema/aop"  

    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"  

    xmlns:context="http://www.springframework.org/schema/context"  

    xsi:schemaLocation="  

     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd  

     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  

     http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd  

     http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd  

     http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">

    

    <context:component-scan base-package="com.gy.inventory.service.*" /> 

       

<!-- 开启注解配置 --> 

<context:annotation-config />

 

<!--  开发环境配置开始  -->

<context:property-placeholder location="classpath:jdbc.properties" />

 

<bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">

<property name="driver" value="${jdbc.driverClassName}" />

   <property name="driverUrl" value="${jdbc.url}" />

   <property name="user" value="${jdbc.username}" />

   <property name="password" value="${jdbc.password}" />

   <property name="alias" value="${jdbc.alias}" />

   <property name="houseKeepingSleepTime" value="${jdbc.houseKeepingSleepTime}"/>

   <property name="prototypeCount" value="${jdbc.prototypeCount}" />

   <property name="maximumConnectionCount" value="${jdbc.maximumConnectionCount}" />

   <property name="minimumConnectionCount" value="${jdbc.minimumConnectionCount}" />

   <property name="trace" value="${jdbc.trace}" />

   <property name="verbose" value="${jdbc.verbose}" />

   <property name="simultaneousBuildThrottle" value="${simultaneous-build-throttle}" />

</bean>

 

<!--  开发环境配置结束 -->

 

<!--jdbc/db为数据源名称 生产环境配置数据源开始-->

<!-- 

<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">

<property name="jndiName" value="java:comp/env/jdbc/inventory"/>

</bean>

-->

<!--jdbc/db为数据源名称 生产环境配置数据源结束-->

 

<!-- 事务管理器 -->

    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">  

        <property name="dataSource" ref="dataSource" />  

    </bean> 

 

<tx:advice id="userTxAdvice" transaction-manager="transactionManager">

<tx:attributes>

<tx:method name="del*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" no-rollback-for="java.lang.RuntimeException" />

<tx:method name="add*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.RuntimeException" />

<tx:method name="update*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" />

<tx:method name="find*" propagation="SUPPORTS" />

<tx:method name="query*" propagation="SUPPORTS" />

<tx:method name="get*" propagation="SUPPORTS" />

<tx:method name="select*" propagation="SUPPORTS" />

</tx:attributes>

</tx:advice>

 

<aop:config>

<aop:pointcut id="pc" expression="execution(public * com.gy.inventory.service.*.*(..))" />

<aop:advisor pointcut-ref="pc" advice-ref="userTxAdvice" />

</aop:config>

    

    <!-- 开启事务注解驱动 -->

<tx:annotation-driven transaction-manager="transactionManager"/>

  

    <!-- 创建SqlSessionFactory -->

    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">  

        <property name="dataSource" ref="dataSource" />  

        <property name="mapperLocations" value="classpath*:mapping/*.xml"/>

        <property name="typeAliasesPackage" value="com.gy.inventory.model" />  

    </bean>  

  

    <!-- 自动扫描映射器(dao) -->

    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">  

        <property name="basePackage" value="com.gy.inventory.mapper" />  

    </bean>  

    

    <!-- 定义国际化消息-->   

   <bean id="messageSource"

class="org.springframework.context.support.ReloadableResourceBundleMessageSource">

<property name="defaultEncoding" value="utf8" />

<property name="basenames" value="classpath:/messages" />

<property name="cacheSeconds" value="0" />

</bean>   

    

   <!-- 获取本地 -->  

   <bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver"/> 

    

</beans> 

 

 

jdbc.properties

 

jdbc.driverClassName=org.gjt.mm.mysql.Driver

jdbc.url=jdbc:mysql://localhost:3306/inventory?useUnicode=true&characterEncoding=UTF-8

jdbc.username=root

jdbc.password=123456

 

jdbc.alias=inventory

#proxool

jdbc.houseKeepingSleepTime=90000

jdbc.maximumnewConnections=10

#

jdbc.prototypeCount=5

#

jdbc.maximumConnectionCount=20

#

jdbc.minimumConnectionCount=5

#

proxool.maximumActiveTime = 60000000

#

proxool.maximumConnectionLifetime=18000000

#

simultaneous-build-throttle=10

#trace

jdbc.trace=true

#verbose  

jdbc.verbose=true

#

proxool.houseKeepingTestSql=SELECT CURRENT_DATE

 

proxool.statistics=1800s,1000m,1d

#INFO  DEBUG

proxool.statisticsLogLevel=INFO

 

 

 

 

log4j.xml

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>

 

<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">

<layout class="org.apache.log4j.PatternLayout">

<param name="ConversionPattern" value="%x %d [%-5p] %c %m%n" />

</layout>

<filter class="org.apache.log4j.varia.LevelRangeFilter">

<param name="LevelMin" value="DEBUG" /><!-- DEBUG -->

<param name="LevelMax" value="FATAL" />

</filter>

</appender>

 

<appender name="LOG.DEBUG" class="org.apache.log4j.DailyRollingFileAppender">

<param name="File" value="${spring.webapp.root}/gy/inventory/debug.log" />

<layout class="org.apache.log4j.PatternLayout">

<param name="ConversionPattern" value="%d{yyy-MM-dd HH:mm:ss} [%-5p] %m%n" />

</layout>

<filter class="org.apache.log4j.varia.LevelRangeFilter">

<param name="LevelMin" value="DEBUG" />

<param name="LevelMax" value="ERROR" />

</filter>

</appender>

 

<appender name="LOG.INFO" class="org.apache.log4j.DailyRollingFileAppender">

<param name="File" value="${spring.webapp.root}/gy/inventory/info.log" />

<layout class="org.apache.log4j.PatternLayout">

<param name="ConversionPattern" value="%d{yyy-MM-dd HH:mm:ss} [%-5p] %m%n" />

</layout>

<filter class="org.apache.log4j.varia.LevelRangeFilter">

<param name="LevelMin" value="INFO" />

<param name="LevelMax" value="ERROR" />

</filter>

</appender>

 

<appender name="LOG.WARN" class="org.apache.log4j.DailyRollingFileAppender">

<param name="File" value="${spring.webapp.root}/gy/inventory/warn.log" />

<layout class="org.apache.log4j.PatternLayout">

<param name="ConversionPattern" value="%d{yyy-MM-dd HH:mm:ss} [%-5p] %m%n" />

</layout>

<filter class="org.apache.log4j.varia.LevelRangeFilter">

<param name="LevelMin" value="WARN" />

<param name="LevelMax" value="ERROR" />

</filter>

</appender>

 

<appender name="LOG.ERROR" class="org.apache.log4j.DailyRollingFileAppender">

<param name="File" value="${spring.webapp.root}/gy/inventory/error.log" />

<layout class="org.apache.log4j.PatternLayout">

<param name="ConversionPattern" value="%d{yyy-MM-dd HH:mm:ss} [%-5p] %m%n" />

</layout>

<filter class="org.apache.log4j.varia.LevelRangeFilter">

<param name="LevelMin" value="ERROR" />

<param name="LevelMax" value="ERROR" />

</filter>

</appender>

 

<appender name="LOG.FATAL" class="org.apache.log4j.DailyRollingFileAppender">

<param name="File" value="${spring.webapp.root}/gy/inventory/fatal.log" />

<layout class="org.apache.log4j.PatternLayout">

<param name="ConversionPattern" value="%d{yyy-MM-dd HH:mm:ss} [%-5p] %m%n" />

</layout>

<filter class="org.apache.log4j.varia.LevelRangeFilter">

<param name="LevelMin" value="FATAL" />

<param name="LevelMax" value="FATAL" />

</filter>

</appender>

 

<root>

<priority value="${gy.log.default.level}" />

<appender-ref ref="LOG.DEBUG" />

<appender-ref ref="LOG.INFO" />

<appender-ref ref="LOG.WARN" />

<appender-ref ref="LOG.ERROR" />

<appender-ref ref="LOG.FATAL" />

<appender-ref ref="STDOUT" />

</root>

 

</log4j:configuration>

 

 

 

 

 

spring-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:p="http://www.springframework.org/schema/p"

xmlns:context="http://www.springframework.org/schema/context"

xmlns:mvc="http://www.springframework.org/schema/mvc" 

xsi:schemaLocation="http://www.springframework.org/schema/beans 

    http://www.springframework.org/schema/beans/spring-beans-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/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

 

<!-- 扫描controller 用于注解 -->

<context:component-scan base-package="com.gy.inventory">

<context:include-filter type="regex" expression="com\.gy\.inventory\.admin\.controller.*" />

<context:include-filter type="regex" expression="com\.gy\.inventory\.web\.controller.*" />

<context:include-filter type="regex" expression="com\.gy\.inventory\.common\.controller.*" />

</context:component-scan>

 

<!-- Process annotations on registered beans like @Autowired... -->

    <context:annotation-config/>

 

    <!-- This tag registers the DefaultAnnotationHandlerMapping and

         AnnotationMethodHandlerAdapter beans that are required for Spring MVC  -->

    <mvc:annotation-driven/>

 

<mvc:resources mapping="/static/js/**" location="/static/js/" />

<mvc:resources mapping="/static/css/**" location="/static/css/" />

<mvc:resources mapping="/static/img/**" location="/static/img/" />

<mvc:resources mapping="/static/images/**" location="/static/images/" />

<mvc:resources mapping="tld/**" location="tld/" />

 

<mvc:resources mapping="/media/js/**" location="/media/js/" />

<mvc:resources mapping="/media/css/**" location="/media/css/" />

<mvc:resources mapping="/media/image/**" location="/media/image/" />

 

 

 

 

<!-- jsp解析器 -->

<bean id="viewResolver"

class="org.springframework.web.servlet.view.InternalResourceViewResolver">

<property name="order" value="1" />

<property name="prefix" value="/WEB-INF/view/"/>

<property name="suffix" value=".jsp"/>

<property name="viewClass" value="org.springframework.web.servlet.view.InternalResourceView"/>

<property name="cache" value="true" />

<property name="requestContextAttribute" value="request" />

<property name="contentType" value="text/html;charset=utf-8"></property>

</bean>

<!-- spring json -->

<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">

   <property name="messageConverters">

   <list>

  <ref bean="jsonHttpMessageConverter"/>

  </list>

   </property>

</bean>

<bean id="jsonHttpMessageConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"/>

</beans>

 

 

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" xmlns:jsp="http://java.sun.com/xml/ns/javaee/jsp"

xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

id="WebApp_ID" version="2.5">

 

<servlet>  

 <servlet-name>Admin</servlet-name>  

 <servlet-class>  

   org.logicalcobwebs.proxool.admin.servlet.AdminServlet  

 </servlet-class>  

</servlet>  

<servlet-mapping>  

 <servlet-name>Admin</servlet-name>  

 <url-pattern>/admin</url-pattern>  

</servlet-mapping>

<!-- 应用路径 -->

<context-param>

<param-name>webAppRootKey</param-name>

<param-value>spring.webapp.root</param-value>

</context-param>

<!-- Log4J 配置 -->

<context-param>

<param-name>log4jConfigLocation</param-name>

<param-value>classpath:log4j.xml</param-value>

</context-param>

<context-param>

<param-name>log4jRefreshInterval</param-name>

<param-value>60000</param-value>

</context-param>

<context-param>

<param-name>contextConfigLocation</param-name>

<param-value>classpath:applicationContext*.xml</param-value>

</context-param>

 

<filter>

<filter-name>Set Character Encoding</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>

</filter>

<filter-mapping>

<filter-name>Set Character Encoding</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

 

<listener>

<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

</listener>

<!-- 使Spring支持request与session的scope,如:<bean id="loginAction" class="com.foo.LoginAction" 

scope="request"/> -->

<listener>

<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>

</listener>

<listener>  

       <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>  

    </listener>  

<!-- Spring 刷新Introspector防止内存泄露 -->

<listener>

<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>

</listener>

 

<servlet>

<servlet-name>spring</servlet-name>

<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

<load-on-startup>1</load-on-startup>

</servlet>

<servlet-mapping>

<servlet-name>spring</servlet-name>

<url-pattern>/</url-pattern>

</servlet-mapping>

 

<!-- 浏览器不支持put,delete等method,由该filter将/blog?_method=delete转换为标准的http delete方法 

<filter>

<filter-name>HiddenHttpMethodFilter</filter-name>

<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>

</filter>

 

<filter-mapping>

<filter-name>HiddenHttpMethodFilter</filter-name>

<servlet-name>spring</servlet-name>

</filter-mapping>

-->

 

<jsp-config>

<taglib>

<taglib-uri>/spring</taglib-uri>

<taglib-location>/WEB-INF/tld/spring.tld</taglib-location>

</taglib>

</jsp-config>

 

<welcome-file-list>

<welcome-file>index.jsp</welcome-file>

</welcome-file-list>

</web-app>

 

 

 

pom.xml

 

<?xml version="1.0"?>

<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <modelVersion>4.0.0</modelVersion>

  <groupId>inventory</groupId>

  <artifactId>inventory</artifactId>

  <version>0.0.1-SNAPSHOT</version>

  <properties>

    <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>

    <surefire.version>2.5</surefire.version>

    <mybatis.version>3.2.3</mybatis.version>

    <junit.version>4.11</junit.version>

    <java_source_version>1.7</java_source_version>

    <java_target_version>1.7</java_target_version>

    <servlet.version>2.5</servlet.version>

    <jstl.version>1.2</jstl.version>

    <maven.compiler.target>1.7</maven.compiler.target>

    <mybatis.spring.version>1.2.1</mybatis.spring.version>

    <mysql.version>5.1.31</mysql.version>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <maven.compiler.source>1.7</maven.compiler.source>

    <spring.version>3.2.7.RELEASE</spring.version>

  </properties>

  <dependencies>

    <dependency>

      <groupId>proxool</groupId>

      <artifactId>proxool</artifactId>

      <version>0.9.1</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>proxool</groupId>

      <artifactId>proxool-cglib</artifactId>

      <version>0.9.1</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-aop</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-aspects</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-beans</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-context</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-context-support</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-core</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-expression</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-jdbc</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-tx</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-web</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-webmvc</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>mysql</groupId>

      <artifactId>mysql-connector-java</artifactId>

      <version>5.1.31</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.mybatis</groupId>

      <artifactId>mybatis</artifactId>

      <version>3.2.3</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.mybatis</groupId>

      <artifactId>mybatis-spring</artifactId>

      <version>1.2.1</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>aopalliance</groupId>

      <artifactId>aopalliance</artifactId>

      <version>1.0</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>asm</groupId>

      <artifactId>asm</artifactId>

      <version>3.3.1</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.aspectj</groupId>

      <artifactId>aspectjweaver</artifactId>

      <version>1.6.11</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>cglib</groupId>

      <artifactId>cglib</artifactId>

      <version>2.2.2</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>commons-logging</groupId>

      <artifactId>commons-logging</artifactId>

      <version>1.1.1</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.codehaus.jackson</groupId>

      <artifactId>jackson-core-asl</artifactId>

      <version>1.8.8</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.codehaus.jackson</groupId>

      <artifactId>jackson-mapper-asl</artifactId>

      <version>1.8.8</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>jstl</groupId>

      <artifactId>jstl</artifactId>

      <version>1.2</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>org.apache</groupId>

      <artifactId>log4j</artifactId>

      <version>1.2.16</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>javax.servlet</groupId>

      <artifactId>servlet-api</artifactId>

      <version>2.5</version>

      <scope>provided</scope>

    </dependency>

    <dependency>

      <groupId>junit</groupId>

      <artifactId>junit</artifactId>

      <version>4.11</version>

      <scope>test</scope>

    </dependency>

    <dependency>

      <groupId>org.springframework</groupId>

      <artifactId>spring-test</artifactId>

      <version>3.2.7.RELEASE</version>

      <scope>test</scope>

    </dependency>

    <dependency>

      <groupId>javax.servlet.jsp</groupId>

      <artifactId>javax.servlet.jsp-api</artifactId>

      <version>2.3.1</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>commons-lang</groupId>

      <artifactId>commons-lang</artifactId>

      <version>2.5</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>net.sf.json-lib</groupId>

      <artifactId>json-lib</artifactId>

      <version>2.2.3</version>

      <scope>compile</scope>

    </dependency>

    <dependency>

      <groupId>net.sf.ezmorph</groupId>

      <artifactId>ezmorph</artifactId>

      <version>1.0.6</version>

      <scope>compile</scope>

    </dependency>

  </dependencies>

  <repositories>

    <repository>

      <releases>

        <enabled>true</enabled>

      </releases>

      <snapshots>

        <enabled>false</enabled>

      </snapshots>

      <id>fusesource</id>

      <url>http://repo.fusesource.com/maven2</url>

    </repository>

    <repository>

      <releases>

        <enabled>false</enabled>

      </releases>

      <snapshots>

        <enabled>true</enabled>

      </snapshots>

      <id>fusesource.snapshot</id>

      <url>http://repo.fusesource.com/maven2-snapshot</url>

    </repository>

    <repository>

      <releases>

        <enabled>true</enabled>

      </releases>

      <snapshots>

        <enabled>true</enabled>

      </snapshots>

      <id>apache-public</id>

      <url>https://repository.apache.org/content/groups/public/</url>

    </repository>

    <repository>

      <releases>

        <enabled>true</enabled>

      </releases>

      <snapshots>

        <enabled>true</enabled>

      </snapshots>

      <id>public</id>

      <url>http://192.168.1.180:8081/nexus/content/groups/public/</url>

    </repository>

    <repository>

      <snapshots>

        <enabled>false</enabled>

      </snapshots>

      <id>central</id>

      <name>Maven Repository Switchboard</name>

      <url>http://repo1.maven.org/maven2</url>

    </repository>

  </repositories>

  <pluginRepositories>

    <pluginRepository>

      <releases>

        <updatePolicy>never</updatePolicy>

      </releases>

      <snapshots>

        <enabled>false</enabled>

      </snapshots>

      <id>central</id>

      <name>Maven Plugin Repository</name>

      <url>http://repo1.maven.org/maven2</url>

    </pluginRepository>

    <pluginRepository>

      <releases>

        <enabled>true</enabled>

      </releases>

      <snapshots>

        <enabled>true</enabled>

      </snapshots>

      <id>nexus</id>

      <url>http://192.168.1.180:8081/nexus/content/groups/public/</url>

    </pluginRepository>

  </pluginRepositories>

  <build>

    <sourceDirectory>D:\workspace1\inventory\src\main\java</sourceDirectory>

    <scriptSourceDirectory>D:\workspace1\inventory\src\main\scripts</scriptSourceDirectory>

    <testSourceDirectory>D:\workspace1\inventory\src\test\java</testSourceDirectory>

    <outputDirectory>D:\workspace1\inventory\target\classes</outputDirectory>

    <testOutputDirectory>D:\workspace1\inventory\target\test-classes</testOutputDirectory>

    <resources>

      <resource>

        <directory>D:\workspace1\inventory\src\main\resources</directory>

      </resource>

    </resources>

    <testResources>

      <testResource>

        <directory>D:\workspace1\inventory\src\test\resources</directory>

      </testResource>

    </testResources>

    <directory>D:\workspace1\inventory\target</directory>

    <finalName>inventory</finalName>

    <pluginManagement>

      <plugins>

        <plugin>

          <artifactId>maven-antrun-plugin</artifactId>

          <version>1.3</version>

        </plugin>

        <plugin>

          <artifactId>maven-assembly-plugin</artifactId>

          <version>2.2-beta-5</version>

        </plugin>

        <plugin>

          <artifactId>maven-dependency-plugin</artifactId>

          <version>2.1</version>

        </plugin>

        <plugin>

          <artifactId>maven-release-plugin</artifactId>

          <version>2.0</version>

        </plugin>

      </plugins>

    </pluginManagement>

    <plugins>

      <plugin>

        <artifactId>maven-compiler-plugin</artifactId>

        <version>2.5.1</version>

        <executions>

          <execution>

            <id>default-testCompile</id>

            <phase>test-compile</phase>

            <goals>

              <goal>testCompile</goal>

            </goals>

            <configuration>

              <source>1.7</source>

              <target>1.7</target>

              <encoding>UTF-8</encoding>

            </configuration>

          </execution>

          <execution>

            <id>default-compile</id>

            <phase>compile</phase>

            <goals>

              <goal>compile</goal>

            </goals>

            <configuration>

              <source>1.7</source>

              <target>1.7</target>

              <encoding>UTF-8</encoding>

            </configuration>

          </execution>

        </executions>

        <configuration>

          <source>1.7</source>

          <target>1.7</target>

          <encoding>UTF-8</encoding>

        </configuration>

      </plugin>

      <plugin>

        <artifactId>maven-surefire-plugin</artifactId>

        <version>2.5</version>

        <executions>

          <execution>

            <id>default-test</id>

            <phase>test</phase>

            <goals>

              <goal>test</goal>

            </goals>

            <configuration>

              <skip>true</skip>

              <useSystemClassLoader>true</useSystemClassLoader>

              <testFailureIgnore>true</testFailureIgnore>

            </configuration>

          </execution>

        </executions>

        <configuration>

          <skip>true</skip>

          <useSystemClassLoader>true</useSystemClassLoader>

          <testFailureIgnore>true</testFailureIgnore>

        </configuration>

      </plugin>

      <plugin>

        <artifactId>maven-resources-plugin</artifactId>

        <version>2.4.2</version>

        <executions>

          <execution>

            <id>default-resources</id>

            <phase>process-resources</phase>

            <goals>

              <goal>resources</goal>

            </goals>

            <configuration>

              <encoding>UTF-8</encoding>

            </configuration>

          </execution>

          <execution>

            <id>default-testResources</id>

            <phase>process-test-resources</phase>

            <goals>

              <goal>testResources</goal>

            </goals>

            <configuration>

              <encoding>UTF-8</encoding>

            </configuration>

          </execution>

        </executions>

        <configuration>

          <encoding>UTF-8</encoding>

        </configuration>

      </plugin>

      <plugin>

        <groupId>org.codehaus.mojo</groupId>

        <artifactId>sonar-maven-plugin</artifactId>

        <version>2.0</version>

      </plugin>

      <plugin>

        <groupId>org.codehaus.sonar</groupId>

        <artifactId>sonar-maven-plugin</artifactId>

        <version>2.11</version>

      </plugin>

      <plugin>

        <artifactId>maven-clean-plugin</artifactId>

        <version>2.4.1</version>

        <executions>

          <execution>

            <id>default-clean</id>

            <phase>clean</phase>

            <goals>

              <goal>clean</goal>

            </goals>

          </execution>

        </executions>

      </plugin>

      <plugin>

        <artifactId>maven-install-plugin</artifactId>

        <version>2.3.1</version>

        <executions>

          <execution>

            <id>default-install</id>

            <phase>install</phase>

            <goals>

              <goal>install</goal>

            </goals>

          </execution>

        </executions>

      </plugin>

      <plugin>

        <artifactId>maven-jar-plugin</artifactId>

        <version>2.3.2</version>

        <executions>

          <execution>

            <id>default-jar</id>

            <phase>package</phase>

            <goals>

              <goal>jar</goal>

            </goals>

          </execution>

        </executions>

      </plugin>

      <plugin>

        <artifactId>maven-deploy-plugin</artifactId>

        <version>2.7</version>

        <executions>

          <execution>

            <id>default-deploy</id>

            <phase>deploy</phase>

            <goals>

              <goal>deploy</goal>

            </goals>

          </execution>

        </executions>

      </plugin>

      <plugin>

        <artifactId>maven-site-plugin</artifactId>

        <version>3.0</version>

        <executions>

          <execution>

            <id>default-site</id>

            <phase>site</phase>

            <goals>

              <goal>site</goal>

            </goals>

            <configuration>

              <outputDirectory>D:\workspace1\inventory\target\site</outputDirectory>

              <reportPlugins>

                <reportPlugin>

                  <groupId>org.apache.maven.plugins</groupId>

                  <artifactId>maven-project-info-reports-plugin</artifactId>

                </reportPlugin>

              </reportPlugins>

            </configuration>

          </execution>

          <execution>

            <id>default-deploy</id>

            <phase>site-deploy</phase>

            <goals>

              <goal>deploy</goal>

            </goals>

            <configuration>

              <outputDirectory>D:\workspace1\inventory\target\site</outputDirectory>

              <reportPlugins>

                <reportPlugin>

                  <groupId>org.apache.maven.plugins</groupId>

                  <artifactId>maven-project-info-reports-plugin</artifactId>

                </reportPlugin>

              </reportPlugins>

            </configuration>

          </execution>

        </executions>

        <configuration>

          <outputDirectory>D:\workspace1\inventory\target\site</outputDirectory>

          <reportPlugins>

            <reportPlugin>

              <groupId>org.apache.maven.plugins</groupId>

              <artifactId>maven-project-info-reports-plugin</artifactId>

            </reportPlugin>

          </reportPlugins>

        </configuration>

      </plugin>

    </plugins>

  </build>

  <reporting>

    <outputDirectory>D:\workspace1\inventory\target\site</outputDirectory>

  </reporting>

</project>

 

 

 

delimiter $$

 

CREATE TABLE `T_SAL_PARA_CONFIG_GROUP` (

  `SAL_CFG_GROUP_CODE_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '参数配置编码',

  `CFGGROUPNAME` varchar(100) DEFAULT NULL COMMENT '参数配置名称',

  `ISACTIVE` char(1) DEFAULT NULL COMMENT '标记此条记录的状态,逻辑删除标志',

  `CREATED` datetime DEFAULT NULL COMMENT '创建时间,取记录创建时的系统时间',

  `CREATEDBY` char(32) DEFAULT NULL COMMENT '由谁创建,值为用户的为主键ID',

  `UPDATED` datetime DEFAULT NULL COMMENT '更新时间,取记录更新时的系统时间',

  `UPDATEDBY` char(32) DEFAULT NULL COMMENT '由谁更新,值为用户的为主键ID',

  PRIMARY KEY (`SAL_CFG_GROUP_CODE_ID`),

  UNIQUE KEY `AK_UQ_ENUMNAME` (`CFGGROUPNAME`)

) ENGINE=MyISAM AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COMMENT='参数配置表'$$

 

delimiter $$

 

CREATE TABLE `DEMO_PARA_CONFIG_ITEMS` (

  `SAL_CFG_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '参数配置项id',

  `SAL_CFG_GROUP_CODE_ID` int(11) DEFAULT NULL COMMENT '参数组编码',

  `CFGKEY` varchar(100) NOT NULL COMMENT '参数配置项键名',

  `CFGVALUE` varchar(100) NOT NULL COMMENT '参数配置项键值',

  `CFGSTATUS` char(1) DEFAULT NULL COMMENT '状态(启用0、禁用1)',

  `CFGLEVEL` char(1) DEFAULT NULL COMMENT '参数访问级别(0-不可见,1-只读,2-读和改)',

  `SORT` int(11) DEFAULT NULL COMMENT '排序',

  `ISACTIVE` char(1) DEFAULT NULL COMMENT '标记此条记录的状态,逻辑删除标志',

  `CREATED` datetime DEFAULT NULL COMMENT '创建时间,取记录创建时的系统时间',

  `CREATEDBY` char(32) DEFAULT NULL COMMENT '由谁创建,值为用户的为主键ID',

  `UPDATED` datetime DEFAULT NULL COMMENT '更新时间,取记录更新时的系统时间',

  `UPDATEDBY` char(32) DEFAULT NULL COMMENT '由谁更新,值为用户的为主键ID',

  `REMARK` varchar(100) DEFAULT NULL COMMENT '参数配置项说明',

  `DEMO_PARA_CONFIG_ITEMScol` varchar(45) DEFAULT NULL,

  PRIMARY KEY (`SAL_CFG_ID`),

  KEY `FK_Reference_17` (`SAL_CFG_GROUP_CODE_ID`)

) ENGINE=InnoDB AUTO_INCREMENT=85 DEFAULT CHARSET=utf8 COMMENT='参数配置项列表'$$

 

上一篇:

下一篇: