개발/시행착오(12)
-
Spring - No EntityManager with actual transaction available for current thread - cannot reliably process 'remove' call 에러 해결
https://stackoverflow.com/questions/32269192/spring-no-entitymanager-with-actual-transaction-available-for-current-thread Spring - No EntityManager with actual transaction available for current thread - cannot reliably process 'persist' call I get this error when trying to invoke "persist" method to save entity model to database in my Spring MVC web application. Can't really find any post or pag..
2020.02.28 -
SpringBoot - JDBC with Session / Error : spring_session table does not exist
SpringBoot : 2.2.2.RELEASE spring-session-jdbc : 2.2.0.RELEASE compile('org.springframework.session:spring-session-jdbc:') 로 spring-session-jdbc를 추가. Library에서 spring-session-jdbc를 찾아 들여다 보면, org.springframework.session.jdbc 내부에 Session 데이터를 저장하기 위한 Table 쿼리문들이 있다. 이 sql 파일중에 내가 연결하는 DB와 맞는 쿼리를 실행시켜서 Table을 만들고 @EnableJdbcHttpSession 로 연결시켜주면 HttpSession에 setAttribute로 저장하면 DB에 자동으로 저장되고 심지어 Exp..
2020.02.16 -
git - 잘못 push한 폴더 삭제하기
$ git rm -r --cached .idea/ rm '.idea/.name' rm '.idea/compiler.xml' rm '.idea/gradle.xml' rm '.idea/jarRepositories.xml' rm '.idea/misc.xml' rm '.idea/vcs.xml' rm '.idea/workspace.xml' $ git commit -m "ignore .idea/" [develop 95fd7a8] ignore .idea/ 7 files changed, 364 deletions(-) delete mode 100644 .idea/.name delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/gradle.xml delete mo..
2020.02.12 -
intellij - @Table(name = " 빨간줄 " ) 이 뜰 경우 빨간줄을 없애는 방법
야매긴 하지만 @Table 어노테이션(Annotaion)에서 빨간줄이 나오면 보기싫다. git에 commit할때도 맨날 오류있으니까 review하라고 물어본다. 이 빨간줄이 나와도 잘 동작하니 없애보도록 하겠다. ctrl + alt + S 를 눌러 Setting으로 들어간다 2. Editor -> inspections 에서 "Unresolved database refereces in annotations" 옵션을 체크 해제 해주면 된다.
2020.02.07 -
git - PR(pull request) 이란
저번주 스터디에서 PR에 관한 이야기를 들었다. 현협에서 쓰기도 한다는데, git에서 내가 작업하고 싶은 repository를 fork 뜬 후, fork를 뜬 repository에서 작업하고, 작업한 내용을 push한다. 이렇게 되면 지금 내가 fork를 뜬 repository는 변경 사항이 push 되었지만, 내가 fork를 떠온, 즉 원래 original한 repository에 변경사항은 아직 적용되지 않았다. 이러한 이점 때문에 회사에서 PR을 사용하는 것 같다. git repository에 CI/CD를 적용해 push되면 자동으로 서버에 올라가는 시스템이 갖추어져 있다면 original Repository에 push하는 행동은 매우 민감한 행동이라고 생각된다. 그렇기 때문에 CTO나 팀장이 직원이..
2020.02.04 -
Centos7 postgreSQL 9.6 에서 Peer authentication failed for user "postgers" 에러 해결
에러 상황 centos7 에서 postgreSQL 9.6 을 설치 후 postgres 계정으로 접속을 시도하려는 도중 에러 발생 해결 방법 sudo vim /var/lib/pgsql/data/pg_hba.config 처음에 pgsql 폴더로 access가 안됬는데 sudo passwd 명령어로 root password를 먼저 지정 하니 access가 되었다. 최 상단에 있는(지금 커서가 있는) 부분이 peer로 되어 있었는데, md5 형식으로 고쳐주니 해결 되었다. 이 문제를 몇시간 동안 잡고있었는데 해결 방법을 보니 너무 허무하다. 앞으로는 글을 차근 차근 읽고 개발 환경에 맞게 검색하고 찾아보아야겠다. 정말 멍청한 실수인데 psql 쉘에서 select 쿼리를 날렸는데 아무 반응이 없길래 뭘 잘못했나 ..
2020.01.17