SampleController.java ( void ) > SPRING1

본문 바로가기

사이트 내 전체검색

뒤로가기 SPRING1

SampleController.java ( void )

페이지 정보

작성자 관리자 작성일 24-07-16 16:17 조회 1,154 댓글 0

본문

package com.pkt.controller;


import org.springframework.stereotype.Controller;

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

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


import lombok.extern.log4j.Log4j;


@Controller 

@RequestMapping("/sample/")

@Log4j

public class SampleController {


// void가 리턴 타입일 경우

@GetMapping("")

public void basic() {

log.info("sample.jsp ...");

// sample.jsp 찾는다.

}


@GetMapping("aa")

public void basic01() {

log.info("/sample/aa.jsp ...");

// /sample/aa.jsp 찾는다.

}

}


댓글목록 0

등록된 댓글이 없습니다.


Copyright © dancePKT. All rights reserved.
PC 버전으로 보기