티스토리 뷰

라이브러리 추가

jdbc
compile('org.springframework.boot:spring-boot-starter-jdbc')
compile('mysql:mysql-connector-java')

mybatis
compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1")
compile("org.mybatis:mybatis-spring")
compile("org.mybatis:mybatis")

 

 

/dashboard/src/main/resources/application.properties
------------------------------------------------------------------
spring.datasource.driver-class-name= com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/db

spring.datasource.username=
아이디
spring.datasource.password=
비밀번호
------------------------------------------------------------------

 

 

VO 생성 : /dashboard/src/main/java/com/lin/dashboard/vo/SearchVO.java

 

mapper.java 생성 : /dashboard/src/main/java/com/lin/dashboard/mapper/DashboardMapper.java

 

mapper.xml 생성 : /dashboard/src/main/resources/mapper/DashboardMapper.xml

 

DashboardApplication.java 수정 : /dashboard/src/main/java/com/lin/dashboard/DashboardApplication.java

 

DashboardController.java 수정 : /dashboard/src/main/java/com/lin/dashboard/controller/DashboardController.java

 

main.jsp 수정 : /dashboard/src/main/webapp/WEB-INF/view/main.jsp

 

 

테스트

 

 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/12   »
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
29 30 31
글 보관함