사실 db설치부터 굉장히 고생했다.. 오라클.....회사서 설치하니 방화벽 머시기 땜시 2일을 죽도로 삭제 - 재설치 - 삭제 재설치.......무한반복했는데 선배님 왈 """설정부터 안되는건 안되는건여요.....쉬운거 하세요...일도 아니고 연습인데.....""

한말씀에 깨달음을 얻고 myspl로 갈아 탔다...쉽게 잘됐다......

도움은 검색과 생활코딩에서 동영상 한번 봤으니깐 참고하시길....

 

다시설치할때는 요롷게 함...

일단 스프링 버전부터 낮게.....jsp파일을 일단할꺼니깐 war...자바 11

스프링 web , mysql, jpa 이런거 미리 걸어서 깔았더니 훨씬 좋다...ㅋㅋ

jsp 파일 상속할 저파일이 자동 설치되어 있다...jar로 시작해서 안보이던 jsp파일생성도 막 보인다..ㅋㅋ

1차에러 

Multiple annotations found at this line:
- cvc-complex-type.4: Attribute 'version' must appear on element 
 'web-app'.
- Attribute: - version is required in element: - web-app Code:

검색해보니 버전 미설치라고 나옴

끝에 넣어주면 됨.
mysql DB 관련해서 설정을 안했다.

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

db설정을 안하고 넘어갔는데 빌드에서 걸렸다..

# MySQL 설정
spring.profiles.include=real-db
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL57InnoDBDialect
spring.session.store-type=jdbc

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
 
# DB Source URL
spring.datasource.url=jdbc:mysql://<IP>:<Port/<DB>?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul

# DB username
spring.datasource.username=<이름>

# DB password
spring.datasource.password=<비번>
 
# true 설정시 JPA 쿼리문 확인 가능
spring.jpa.show-sql=true
 
# DDL(create, alter, drop) 정의시 DB의 고유 기능을 사용할 수 있다.
spring.jpa.hibernate.ddl-auto=update
 
# JPA의 구현체인 Hibernate가 동작하면서 발생한 SQL의 가독성을 높여준다.
spring.jpa.properties.hibernate.format_sql=true

# Logging
logging.level.org.springframework.web=DEBUG

이렇게 넣어줌....검색의 감사함..고마움...행복함..^^

java.sql.SQLException: Access denied for user '이름'@'localhost' (using password: YES)

이런에러가 났다.....계정설정을 안해서 인듯......

https://pika-chu.tistory.com/388

 

[Error] nested exception is java.sql.SQLException: Access denied for user '계정명'@'localhost' (using password: YES)] with ro

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nest

pika-chu.tistory.com

이분의 글을 참고해서 mysql 변경...했더만 에러변경

SQL Error: 1044, SQLState: 42000

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.SQLGrammarException: Unable to open JDBC Connection for DDL execution

 

저는 계정이 설정이 안되었다고 해서...cmd창으로 계정의 설정 삭제...무한반복하다가...

mysql 동영상강좌.....생활코딩과 이수안님의 강좌를 거진 3시간에 걸쳐서  다시 듣고......오라클과 비슷하나 다른듯....^^

드뎌 오타를 발견했습니다!!!ㅜㅜ db명칭 잘못적었습니다....수정하니 됩니다...

저는 지금 4일째 오라클과 인터넷 계정(회사에서 했더만), jsp파일....다시 mysql을 거쳐서 제자리입니다.^^

 

+ Recent posts