본문 바로가기

728x90
반응형

Spring

(25)
google analytics 4 1. Google Analytics 4 API 설정GA4 데이터를 가져오기 위해 Google Analytics Data API를 사용(1) Google Cloud Console 설정프로젝트 생성:Google Cloud Console에 접속하여 새 프로젝트를 생성API 활성화:"Library"에서 Google Analytics Data API v1을 검색하고 활성화서비스 계정 생성:"IAM & Admin > Service Accounts"에서 새 서비스 계정을 만들기JSON 키 파일을 다운로드Google Analytics 계정 연결:Google Analytics 관리자 설정에서 계정 > 계정 설정 > 계정 액세스 관리로 이동하여 서비스 계정 이메일을 추가권한: 읽기 및 분석 이상 부여.2. API 호출을 ..
Consider defining a bean of type 'projcect.vue.repository.MemberRepository' in your configuration. Field memberRepository in projcect.vue.cont.AdminController required a bean of type 'projcect.vue.repository.MemberRepository' that could not be found. The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true)  Action: Consider defining a bean of type 'projcect.vue.repository.MemberRepository' in your configuration. 아... 계속 못 찾는단다..
CORS error 계속 cors error 가 나서 이해가 안가서 12시간 동안 생각해봤는데... controller에서 static을 선언해놓은것....으....블로그 쓰고 저장했는데... 또 안된다... 이거 때문이 아닌듯  testImplementation 'org.springframework.boot:spring-boot-starter-test'이거랑 implementation 'org.springframework.boot:spring-boot-starter-security' 이거 지우니까 잘 된다... 뭐지...
lombok.jar 적용 되지 않을 때 아니... 올만에 lombok 설정해볼라고 했는데 잘되지 않더라...https://computer-science-student.tistory.com/513 [이클립스, Eclipse] lombok(롬복) 설치Eclipse lombok(롬복) 설치 이클립스에서 lombok 어노테이션인 @Getter와 @Setter를 사용하려고 하니 제대로 동작하지 않았다. build.gradle에 dependency로 추가해줬음에도 불구하고 적용이 되지 않아 확인해보computer-science-student.tistory.com 이 분의 블로그를 참고 했다... 아놔  https://projectlombok.org/download Download projectlombok.org 위에 블로그처럼 다운받은 lombok.ja..
'import Getting Started Content' has encountered a problem 연습삼아 프로젝트 만들려고 하니까 아래와 같은 에러 나서 짜증남...version 문제인거 같다...  Spring Boot Version 을 3.4.1 하니까...  Spring Boot Version 을 3.3.7 로 다운그레이드해서 바꿔줌! 똑같이 안되더라... 그래서  생각해보니 실행하고 있는 sts에서는java 11이 최신이다... 최신 버전을 깔아줘야함...4.27 버전 깔아주니 잘 된당!!! 유후!!! 오전 시작할때 기분 안 좋았는뎅 ㅎㅎ기분 좋아짐
쿼리 파라미터 로그 남기 application.yml 에  을 추가해주면 뜨는데... 나는 또 안 뜬다... 그냥 일단 넘어간다.  근데 이렇게 까지 했는데 아직 더 파라미터를 보고 싶다하면 아래 사이트로 들어가 본다.https://github.com/gavlyukovskiy/spring-boot-data-source-decorator GitHub - gavlyukovskiy/spring-boot-data-source-decorator: Spring Boot integration with p6spy, datasource-proxy, flexy-pool and sSpring Boot integration with p6spy, datasource-proxy, flexy-pool and spring-cloud-sleuth - gavl..
jar build 해서 동작 확인 지금 하고 있는 프로젝트에서 gradlew clean build 한다. 깔끔하게 지우고 다시 build를 해주는거란다. 근데 안된다...  BUILD FAILED ㅎㅎㅎ 아놔... Publishing a build scan to scans.gradle.com requires aceepting the Gradle Terms of Use defined at https://gradle.com/help/legal-terms-of-use. Do you accept these terms? [yes, no]에 대답을 yes로 하니 Gradle Terms of Use accepted 하면서 끝나더라...된건지 찝찝...
MVCC=TRUE application.yml에 url: jdbc:h2:tcp://localhost/~/jpashop;MVCC=TRUE 이렇게 넣고 rerun을 하면 error 가 났다. 구글링해보니   주의: H2 데이터베이스의 MVCC 옵션은 H2 1.4.198 버전부터 제거되었습니다. *1.4.200 버전에서는 MVCC 옵션을 사용하면 오류가 발생*합니다.  그래서 url에url: jdbc:h2:tcp://localhost/~/jpashop; 넣으니 잘 굴러간다... 아침부터 시간 낭비, 전력 낭비한듯...
Intellij 단축키 만들기 Setting 에 들어가서 4번에는 아래와 같이 입력해줬다@Testpublic void $NAME$() throws Exception{ //given $END$ //when //then} 이렇게 하면 tdd  입력하고 탭 클릭하면 자동완성 된다. 근데 하려고하니까 안되더라... 왜인지 모르겠더라... 근데... 이렇게 되어 있어서 그랬던거였다... 그래서 ㅎㅎ 일단 이렇게 설정해줬다. 잘될거 같다 ㅎㅎ 잘 뜬다 ㅎㅎㅎ 별거 아닌데 기분 좋음
JPA와 DB 설정, 동작확인 application.properties를 삭제하고  application.yml 파일을 만들어준다.spring: datasource: url: jdbc:h2:tcp://localhost/~/jpashop;MVCC=TRUE username: sa password: driver-class-name: org.h2.Driver jpa: hibernate: ddl-auto: create properties: hibernate:# show_sql: true format_sql: truelogging: level: org.hibernate.SQL: debug

728x90
반응형