아이디어 구축 springboot+my batis 프레임 워 크 튜 토리 얼
2838 단어 ideaspringbootmybatis
2.Spring Initializr 를 선택 하고 Default 를 선택 한 후[Next]를 클릭

3.프로젝트 의 파일 디 렉 터 리 구조 와 jdk 버 전 정 보 를 선택 하고 설정 이 완료 되면[Next]을 클릭 합 니 다.

4.항목 선택 에 필요 한 의존 도 는 웹 에서 Spring Web 을 선택 합 니 다.

SQL 에서 필요 한 의존 도 를 선택 하고[Next]를 클릭 합 니 다.

5.항목 이름,항목 저장 경 로 를 수정 하고[finish]를 클릭 합 니 다.

6.생 성 이 완료 되면 네트워크 가 양호 해 야 합 니 다.방금 선택 한 의존 도 를 불 러 와 야 하기 때 문 입 니 다.(다운로드 의존 도 는 오래 걸 릴 수 있 으 므 로 네트워크 가 좋 은 상황 에서 다운로드 하고 인내심 을 가지 고 기 다 려 야 합 니 다)pom.xml 파일 은 의존 도 를 추가 하 는 곳 입 니 다.

7.springboot+my batis 파일 구 조 를 보완 하여 디 렉 터 리 에 폴 더 를 만 듭 니 다.

8.프로필 을 만 들 고 설정 하기

이 두 개의 yml 파일 응용 프로그램-dev.yml 파일 을 만 드 는 데 필요 한 설정 코드:
spring:
datasource:
url: jdbc:mysql://localhost:3306/studentmanagement?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
server:
port: 3306
# mybatis
mybatis:
#
typeAliasesPackage: com.example.study.entity
# mapper , mapper.xml
mapper-locations: classpath:mybatis/mapper/*.xml
#
configuration:
map-underscore-to-camel-case: true

응용 프로그램.yml 파일 에 필요 한 설정 코드
spring:
profiles:
active: dev
thymeleaf:
prefix:
classpath: /templates # template html ,
cache: false # ,

9.설정 완료 후 시작

시작 한 후에 틀 이 잘 통합 되 었 다 는 것 을 잘못 설명 하지 않 고 사용 할 수 있 습 니 다.
아이디어 가 spring boot+my batis 프레임 워 크 를 구축 하 는 과정 에 대한 자세 한 설명 은 여기까지 입 니 다.더 많은 아이디어 가 spring boot+my batis 프레임 워 크 를 구축 하 는 내용 은 예전 의 글 을 검색 하거나 아래 의 관련 글 을 계속 찾 아 보 세 요.앞으로 많은 응원 부탁드립니다!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Gradle + Kotlin + Thymeleaf에서 Hello World평소에는 toB의 업무 시스템을 만들고 있습니다. 사내에서의 기술의 업데이드가 없기 때문에 개인적으로 여러가지 배우려고 생각해, 처음에 Spring Boot로 간단한 프로젝트를 만들려고 했습니다만 생각보다 걸리거나 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.