▲ TimeMapperTest > SPRING1

본문 바로가기
사이트 내 전체검색

SPRING1

▲ TimeMapperTest

페이지 정보

profile_image
작성자 관리자
댓글 0건 조회 83회 작성일 24-07-16 14:50

본문

package com.pkt.controller;


import org.junit.Test;

import org.junit.runner.RunWith;

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

import org.springframework.test.context.ContextConfiguration;

import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


import com.pkt.mapper.TimeMapper;


@RunWith(SpringJUnit4ClassRunner.class)

@ContextConfiguration("file:src/main/webapp/WEB-INF/root-context.xml")

public class TimeMapperTest {


@Autowired

private TimeMapper timeMapper;


@Test

public void tetGetTime() {

System.out.println("현재시간:"+timeMapper.getTime());

}

}





[ 콘솔 결과 ]
현재시간:2024-07-16 14:49:30
INFO : com.pkt.controller.TimeMapperTest - 현재시간:2023-06-01 13:51:52

두개의 출력 구문의 차이 : log객체를 이용하면 패키지 경로.클래스 명을 알려준다.

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

사이트 정보

공지사항
자유게시판
질문답변
1:1문의

 

별명 : 터푸가위
주소 : 부산시 동래구 명장로20번길 90
대표 : 박규태
메일 : dancepkt@******.com

접속자집계

오늘
84
어제
366
최대
10,760
전체
286,050
Copyright © dancePKT . All rights reserved.