⺣ - רҵ·ĵϷƽ̨

ǰλãҳ > Spring MVC AOP通过注解方式拦截Controller等实现日志管?- 百度文库

Spring MVC AOP通过注解方式拦截Controller等实现日志管?- 百度文库

  • 62 Ķ
  • 3
  • 2025/12/9 20:05:24

עҲдˣspringҲúˣcontrollerôأ

ControllerӦ

package com.jiankunking.controller;

import com.jiankunking.common.OperationLogger; import org.springframework.stereotype.Controller;

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

@Controller

@RequestMapping(value = \public class WelcomeController {

@OperationLogger(modelName = \ @RequestMapping(value = \ public void getWelcome() {

//쳣ز //int i = 9 / 0;

System.out.println(\ִУ\ } }

βأ

ǰ˷ajaxcontroller:

$.ajax({

type: \

url: \ contentType: \ data: null,

success: function () {

// alert(\ },

error: function () {

// alert(\ʧܣ\ } });

Ч£

  • ղ
  • Υٱ
  • Ȩ
ĵ10.00 Ԫ VIP
ߣ...

92ƪĵ

ĵ飺

οͿͨغɸƺŰ棩
ƪ
ʱؼۣ10 Ԫ/ ԭ:20Ԫ
VIP
ؼۣ29 Ԫ/ ԭ:99Ԫ
0.3 Ԫ/ ÿ150
ȫվɸ
VIP
ؼۣ29 Ԫ/ ԭ:99Ԫ
0.3 Ԫ/ ÿ150
ȫվɸ
עĵпܡֻĿ¼ݲȫ֮ǰעѸ޷ػ⣬ϵЭ㴦
΢ţfanwen365 QQ370150219
Copyright © ⺣ All Rights Reserved. ICP16052595-3 վͼ ͷQQ370150219 䣺370150219@qq.com