하루하나
close
프로필 배경
프로필 로고

하루하나

  • ALL (217)
    • 쿠베플로우 kubeflow (1)
    • React Native (1)
      • Expo (1)
    • Programming (187)
      • spring+jwt+react (4)
      • wordpress (3)
      • Vultr (1)
      • Flutter (3)
      • Vue-project (1)
      • Vue-tip (17)
      • AngularJS (12)
      • Bootstrap (2)
      • Book (1)
      • CentOS (5)
      • Code (0)
      • Css (13)
      • Docker (7)
      • Eclipse (1)
      • Freemarker (1)
      • Git (9)
      • Front-End (6)
      • Error (7)
      • Gulp.js (0)
      • Java (12)
      • Python (5)
      • Javascript (19)
      • JPA (5)
      • jQuery (2)
      • Mac (6)
      • MySql (4)
      • Springboot (21)
      • Springboot-blog (0)
      • Daily (1)
      • Springboot-tip (3)
      • Spring (1)
      • Thymeleaf (1)
      • Tomcat (1)
      • Typescript (3)
      • Tool (5)
      • Sql (1)
      • prisma (1)
      • react (1)
    • Life (14)
      • Review (0)
      • Tip (3)
      • 리뷰 (8)
      • 부동산 (2)
  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록

[springboot] junit4 + controller test [mockMvc]

gradle 기본셋팅 후 webcontroller 생성@RestController public class WebController { @GetMapping public String test() { return "hello"; } } test code 작성import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.s..

  • format_list_bulleted Programming/Springboot
  • · 2020. 3. 27.
  • textsms

[chrome] livereload does not work

'livereload' extension does not work https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei you can use this 'livereload++'https://chrome.google.com/webstore/detail/livereload%2B%2B/ciehpookapcdlakedibajeccomagbfab/related livereload가 동작하지 않을때 크롬에 확장프로그램을 livereload가 아닌 livereload++을 사용하시면 됩니다. tag : could not download livereload,js

  • format_list_bulleted Programming/Front-End
  • · 2020. 2. 17.
  • textsms

[springboot] jar 실행시 profile 선택

jar로 단독실행시 프로파일을 설정해줄수 있다. application-prod.properties 파일을 만들고 아래와 같이 실행 java -jar sample.jar --spring.profiles.active=prod

  • format_list_bulleted Programming/Springboot
  • · 2019. 1. 9.
  • textsms

[springboot] CORS 설정

1234567@Configurationpublic class WebConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**").allowedOrigins("*").allowedMethods("*"); }}Colored by Color Scriptercs WebMvcConfigurer의 addCorsMappings 재정의 해주면 된다. 현재 설정은 모든 path, origin, methods를 허용한다는 건데 각자의 상황에 맞게수정하면 된다. @Configuration을 적어줘야 적용된다. cors는 재시동 필요

  • format_list_bulleted Programming/Springboot-tip
  • · 2018. 4. 9.
  • textsms

[thymeleaf] springboot + org.thymeleaf.exceptions.TemplateInputException

로컬에선 잘 돌아가는데, jar로 build하고 외부에서 실행시켜보면 아래와 같이 에러 발생 org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/xxxxx/main", template might not exist or might not be accessible by any of the configured Template Resolvers 1시간동안 삽질해본 결과 controller에서 return 해주는 string 값에 문제. @RequestMapping("....") public String ...... {return "/xxxxx/main"; // ide에서 실행했을 경우 이상없이 표시 return "xxxxx/ma..

  • format_list_bulleted Programming/Error
  • · 2017. 7. 14.
  • textsms

[springboot] mybatis-multiple-datasource / db 여러개 사용

- GoalSpringBoot에서 mybatis에 DB를 여러개 사용하기 위한 설정 - Time30min - Enviromentjava 1.8, springboot 1.5.2 - Tutorial개발을 하다보면 데이터베이스를 여러개 운영 해야하는 경우가 생긴다. mybatis를 이용할 경우 설정하는 방법인데, 결론적으로는 마음에 들진 않는다. JPA로 설정하는법은 아래 포스팅을 참고2017/03/24 - [Springboot] - [springboot] jpa multiple datasource 우선 기본적으로 application.properties에 DB정보를 작성한다. 편의를 위해 DB는 H2를 사용한다. # DB1spring.db1.datasource.driverClassName=org.h2.Dri..

  • format_list_bulleted Programming/Springboot
  • · 2017. 3. 29.
  • textsms
  • navigate_before
  • 1
  • 2
  • 3
  • 4
  • navigate_next
반응형
공지사항
전체 카테고리
  • ALL (217)
    • 쿠베플로우 kubeflow (1)
    • React Native (1)
      • Expo (1)
    • Programming (187)
      • spring+jwt+react (4)
      • wordpress (3)
      • Vultr (1)
      • Flutter (3)
      • Vue-project (1)
      • Vue-tip (17)
      • AngularJS (12)
      • Bootstrap (2)
      • Book (1)
      • CentOS (5)
      • Code (0)
      • Css (13)
      • Docker (7)
      • Eclipse (1)
      • Freemarker (1)
      • Git (9)
      • Front-End (6)
      • Error (7)
      • Gulp.js (0)
      • Java (12)
      • Python (5)
      • Javascript (19)
      • JPA (5)
      • jQuery (2)
      • Mac (6)
      • MySql (4)
      • Springboot (21)
      • Springboot-blog (0)
      • Daily (1)
      • Springboot-tip (3)
      • Spring (1)
      • Thymeleaf (1)
      • Tomcat (1)
      • Typescript (3)
      • Tool (5)
      • Sql (1)
      • prisma (1)
      • react (1)
    • Life (14)
      • Review (0)
      • Tip (3)
      • 리뷰 (8)
      • 부동산 (2)
최근 글
인기 글
최근 댓글
태그
  • #GIT
  • #JPA
  • #javascript
  • #springboot
  • #MySQL
  • #error
  • #sts
  • #Vue
  • #AngularJS
  • #css
전체 방문자
오늘
어제
전체
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바