博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SpringMVC前置控制器SimpleUrlHandlerMapping配置
阅读量:6132 次
发布时间:2019-06-21

本文共 8563 字,大约阅读时间需要 28 分钟。

1.

1 
2
7 8
11
HotelMaster
12 13
14
webAppRootKey
15
hotelmaster.root
16
17 18 19
21 22
23
contextConfigLocation
24
25 /WEB-INF/hotel-security.xml, 26 /WEB-INF/hotel-hibernate.xml, 27 /WEB-INF/hotel-servlet.xml, 28 /WEB-INF/hotel-services.xml 29
30
31 32
33
34
log4jConfigLocation
35
/WEB-INF/classes/log4j.properties
36
37 38
39
log4jRefreshInterval
40
60000
41
42 43
44
45
acegiAjaxFilter
46
com.hotelmaster.home.web.filter.AcegiAjaxFilter
47
48 49
50
logoutAjaxFilter
51
com.hotelmaster.home.web.filter.LogoutAjaxFilter
52
53
54
55
acegiFilterChain
56
org.acegisecurity.util.FilterToBeanProxy
57
58
targetClass
59
org.acegisecurity.util.FilterChainProxy
60
61
62
63
64
acegiAjaxFilter
65
/j_acegi_security_check
66
67 68
69
logoutAjaxFilter
70
/userLogout.htm
71
72 73
74
75
acegiFilterChain
76
/j_acegi_security_check
77
78
79
80
acegiFilterChain
81
*.htm
82
REQUEST
83
84 85
86
acegiFilterChain
87
*.jsp
88
REQUEST
89
90 91
92
93
94 org.springframework.web.util.Log4jConfigListener 95
96
97 98
99
org.springframework.web.context.ContextLoaderListener
100
101 102
103
104
dwr-invoker
105
DWR Servlet
106
org.directwebremoting.servlet.DwrServlet
107
108
debug
109
true
110
111
112 113
114
dwr-invoker
115
/dwr/*
116
117 118 119 120
121
122
dispatcherServlet
123
124 org.springframework.web.servlet.DispatcherServlet125
126
127
contextConfigLocation
128
/WEB-INF/hotel-servlet.xml
129
130
0
131
132 133
134
dispatcherServlet
135
*.htm
136
137 138
139
120
140
141 142
143
/WEB-INF/pages/index.jsp
144
145

 

 

2.

1 
2
6 7 8
12
13
14
15
16
userLoginController
17
homeController
18
frontdeskController
19
checkinController
20
guestInforController
21
reservController
22
guestHistoryController
23
checkoutController
24
basicSettingController
25
businessCalculationController
26
27
28
29 30
31
33
34
35 36
37
38
39
40 41
42
43
44
45 46
47
48
49
50
51
52
53
54
55
56
57
58
59
60 61
62
63
64
65
66
67
68
69 70
71
72
73
74
75
76
77
78 79
80
81
82
83
84
85
86
87 88
89
90
91
92
93
94
95
96 97
98
99
100
101
102
103
104
105
106
107
108 109
110
111
112
113
114
115
116
117 118
119
120
121
122
123
124
125
126 127
128
129
130
131
132
133
134
135

 

 

3.

1 package com.hotelmaster.home.web.login; 2 import javax.servlet.http.HttpServletRequest; 3 import javax.servlet.http.HttpServletResponse; 4  5 import org.apache.log4j.Logger; 6 import org.springframework.web.servlet.ModelAndView; 7 import org.springframework.web.servlet.mvc.multiaction.MultiActionController; 8  9 10 /**11  * Class description goes here.12  * 13  * @author FoGhost14  * @Date Mar 21, 200815  */16 public class UserLoginController extends MultiActionController{17     /** Logger for this class and subclasses */18     protected final Logger logger = Logger.getLogger(UserLoginController.class);19     20     public ModelAndView init (HttpServletRequest request,HttpServletResponse response) throws Exception{21         return new ModelAndView("userLogin");22         //return null;23     }24     25     public ModelAndView userLogin(HttpServletRequest request,HttpServletResponse response)throws Exception{26         String userID=(String) request.getParameter("userID").trim();27         String userPass=(String) request.getParameter("userPass").trim();28         if(userID.equals("admin")&& userPass.equals("admin") ){29         //return new ModelAndView("login");30             request.getSession().setAttribute("user", "admin");31             response.getWriter().write("{success: true}");32             return null;33         }else{34             35             response.setContentType("text/json; charset=utf-8");36             response.getWriter().write("{success: false,errors:{ reason: '用户名密码错误' }}");37             return null;38         }39     }40 }

 

转载于:https://www.cnblogs.com/sharpest/p/6185329.html

你可能感兴趣的文章
java8函数式编程实例
查看>>
jqgrid滚动条宽度/列显示不全问题
查看>>
在mac OS10.10下安装 cocoapods遇到的一些问题
查看>>
angularjs表达式中的HTML内容,如何不转义,直接表现为html元素
查看>>
css技巧
查看>>
Tyvj 1728 普通平衡树
查看>>
[Usaco2015 dec]Max Flow
查看>>
javascript性能优化
查看>>
多路归并排序之败者树
查看>>
java连接MySql数据库
查看>>
转:Vue keep-alive实践总结
查看>>
android studio修改新项目package名称
查看>>
深入python的set和dict
查看>>
C++ 11 lambda
查看>>
Hadoop2.5.0 搭建实录
查看>>
实验吧 recursive write up
查看>>
High-speed Charting Control--MFC绘制图表(折线图、饼图、柱形图)控件
查看>>
go test命令參数问题
查看>>
linux 搜索文本
查看>>
超实用Mac软件分享(二)
查看>>