분류 전체보기
-
-
1. 기본세팅하기java/Spring블로그 만들기 2020. 7. 2. 21:00
[STS로 스프링 mvc프로젝트 생성후] 1.web.xml에 먼저 한글 인코딩부터 설정한다 encodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 forceEncoding true encodingFilter /* 2.pom.xml에 나는 db가 mariadb이고 mybatis를 사용할거기 때문에 org.springframework spring-test ${org.springframework-version} test org.bgee.log4jdbc-log4j2 log4jdbc-log4j2-jdbc4 1.16 org.mybatis mybatis-spring 2.0.4 org.springframework sprin..
-
추상클래스 다형성과 오버라이딩에 대하여java/자바공부 2020. 7. 1. 13:07
추상클래스는 다형성과 오버라이딩으로 이점을 볼 수 있다. [다형성이란] 타입 변수 = new 생성자(); 여기서 타입으로는 부모 타입이 놓일 수 있고, 생성자 위치에는 자식들이 놓일 수 도 있다. 쉽게 말해 생성자 자리에 서로 다른 클래스가 놓일 수 있는 즉 타입이 다양할 수 있다는 성질. 타입은 조상 클래스 중 어느것이든 사용가능. 바꿔 말하면 조상 클래스를 타입으로 선언한 변수에는 어떤 자손 클래스든 담을 수 가 있습니다. class Object{ public void action(){ System.out.println("action"); } } class Block1 extends Object{ public void action(){ System.out.println("네모회전"); } } clas..
-
-
스프링에서 controller에서 return페이지가 없는 void함수java/스프링공부 2020. 6. 28. 18:53
@RequestMapping("/member/*"); 1) @RequestMapping(value="/register", method=RequestMethod.GET); public void getRegister() throws Exceptions{ } 2) @RequestMapping(value="/register", method=RequestMethod.GET); public String getRegister() throws Exceptions{ return "member/register"; } 두가지의 결과값은 같다. void 로 설정하면 현재 호출한 url의 경로로 뷰를 찾는다. 알아두면 좋을것 같다.
-
레거시 php를 이용해 mailgun 사용하기PHP 2020. 6. 26. 11:48
발송용 함수 function mailgun_mailer($fname, $fmail, $to, $subject, $content, $type=0, $files=array(), $cc="", $bcc="") { include_once(__DIR__.'/lib/Mailgun.php'); if ($type != 1) $content = nl2br($content); $mail = new Mailgun(); $from = $fname ? $fname."" : $fmail; $mail->from($from); $mail->to($to); if ($cc) { $mail->cc($cc); } if ($bcc) { $mail->bcc($bcc); } $mail->subject($subject); $mail->messag..