- 쉽다 ALTER TABLE (테이블명) ENGINE = (변경할엔진)
1
|
ALTER TABLE d_user ENGINE = InnoDB;
| cs |
1
2
3
4
5
6
7
8
9
10
|
<mvc:interceptors>
<!-- visor 윈도우 interceptor -->
<mvc:interceptor>
<mvc:mapping path="/visor_w/*"/>
<bean class="comm.utill.visor_wInterceptor"></bean>
</mvc:interceptor>
<!--
추가로 여러가지 패턴에 해당하는
인터셉터 설정가능-->
</mvc:interceptors>
| cs |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
public class visor_wInterceptor extends HandlerInterceptorAdapter{
@Autowired
private OwnerDao ownerDao;
public boolean preHandle(HttpServletRequest request, HttpServletResponse response,Object handler){
boolean result=false;
//자신의 하위매장인지여부 체크
try {
Authentication authority = SecurityContextHolder.getContext().getAuthentication();
customUserDetails userDetails=(customUserDetails) authority.getDetails();
int u_seq = userDetails.getSeq();//현재 유저 seq
int w_seq=Integer.parseInt(request.getParameter("w_seq"));//요청한 하위 매장 seq
System.out.println("추가 window 요청한 seq : "+u_seq);
System.out.println("추가 window에 나올 seq : "+w_seq);
System.out.println("하위 매장 들");
for(Integer i : ownerDao.getMyOwnerSeq(u_seq)){
if(i == w_seq){
result=true;
};
}
if(!result){
try {
response.sendRedirect("/Dongnero/main");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} catch (Exception e) {
e.printStackTrace();
return false;
}
return result;
}
}
| cs |