일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- 코루틴 컨텍스트
- 달인막창
- PersistenceContext
- 겨울 부산
- Value too long for column
- vfr video
- JanusWebRTCServer
- 티스토리챌린지
- terminal
- VARCHAR (1)
- mp4fpsmod
- tolerated
- JanusGateway
- 자원부족
- JanusWebRTCGateway
- pytest
- preemption #
- table not found
- 개성국밥
- JanusWebRTC
- 깡돼후
- k8s #kubernetes #쿠버네티스
- 오블완
- kotlin
- 헥사고날아키텍처 #육각형아키텍처 #유스케이스
- Spring Batch
- PytestPluginManager
- 코루틴 빌더
- taint
- python
목록개발/Spring Boot (32)
너와 나의 스토리
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bKgTr5/btqG4btBVet/OKet0K1ERcVUmIJKSdI24k/img.png)
Spring security : 스프링 기반의 어플리케이션의 보안(인증과 권한)을 담당하는 프레임워크이다. 만약 스프링 시큐리티를 사용하지 않았다면? 자체적으로 세션을 체크하고 redirect 등을 해야할 것이다. Spring security는 filter 기반으로 동작하기 때문에 spring MVC와 분리되어 관리 및 동작한다. 보안 관련 용어 접근 주체(Principal): 보호된 대상에 접근하는 유저 인증(Authenticate): 현재 유저가 누구인지 확인 (ex. 로그인) 애플리케이션의 작업을 수행할 수 있는 주체임을 증명 AuthenticationManager, AuthenticationProvider 인가(Authorize): 현재 유저가 해당 리소스[어떤 서비스, 페이지]에 접근할 수 있는..
dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'junit:junit:4.12..
이상적인 RUL: 짧고, 기술적이고, 효율적 URL design: the technical basics 1. 단어를 hyphen으로 구분하기 eg. example.com/tennisequipment-> example.com/tennis-equipment * underscores( _ ) 사용하지 않기! 2. URLs 안에 데이터 사용하는 것 고려하기 eg. http://www.news.com/2015/08/17/news-article -> 해당 게시물에 날짜 스탬프를 업데이트하면, url도 변경되고, 이전 url이 새로운 url로 리다이렉션 되는지 확인해야 함. 3. 소문자로 작성하기 4. 절대 CRUD 함수 이름을 URL에 사용하면 안 된다. GET "/devices/{id}" DELETE "/devi..
[ ~~.csrf().disable() ]를 추가하자! CSRF 때문에 forbidden이 뜬 것!! CSRF란? 자기도 모르게 특정 웹사이트 요청하는 공격하게 되는 것을 말한다. 이를 방지하기 위해 default로 post가 막혀있는 것 같다. /*import*/ @Configuration @EnableWebSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private CustomAuthenticationProvider customAuthenticationProvider; @Bean public PasswordEncoder passwordEncoder() { // bcrypt 해쉬 알고리즘 이용 ..
import org.h2.server.web.WebServlet; → import 안되는 경우 build.gradle 에서 runtimeOnly 'com.h2database:h2' 를 compile 'com.h2database:h2' 로 바꾸면 된다.
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cjce15/btqD4TH4bqL/kC0o5fkBskQFtEu43EKCJK/img.png)
"https://jojoldu.tistory.com/251" 블로그를 보고 Controller를 작성하였습니다. * 참고로 "localhost:8080/h2-console"에서 h2 연결할 때, [JDBC URL: jdbc:h2:mem:testdb]로 설정해주셔야 합니다.
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/XRxU2/btqD2bws4Ek/SAVXqe4mjoKPAPPdrII6dk/img.png)
다음과 같은 오류가 났다 "C:/Users/유저명/test"가 없어서 생긴 문제이다. 메모장을 켜고, 빈 메모장을 test.mv.db로 저장했다. 그리고 다시 연결해보면?!! 연결 성공! 하지만! 데이터 연동이 안된다...... ㅠㅠ 해결책: [JDBC URL: jdbc:h2:mem:testdb]로 설정해주니 연결, 연동 다 잘된다. ㅎㅎ test.mv.db 파일은 그냥 삭제했다....
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/lmmkI/btqDWsqu62Y/ey5hD45THhrF1JHclNIkmK/img.png)
Eclipse에서 다음과 같이 index.html을 만들고 main code를 실행하니 "This application has no explicit mapping for /error, so you are seeing this as a fallback." 에러 출력됨 해결책: [src/main/resources] 하위에 있는 "application.properties"에 다음을 입력하면 문제 해결! spring.mvc.view.prefix=/WEB-INF/jsp/ spring.mvc.view.suffix=.jsp 하지만 컨트롤러에 작성한 대로 "localhost:8080/hello"에 접근하니 똑같은 에러가 발생하였다. 해결책: main code에 경로를 지정해주니 해결!