글 목차
728x90
목차 : https://okane-on-cliff.tistory.com/246
스프링 부트는 메이븐, 자바8을 사용하였다.
라이브러리는 스프링 웹, 스프링 데브툴, 롬복, 마이바티스, MySQL, JWT, common-io를 사용하였다.
1. pom.xml
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<!-- JWT -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.1</version>
</dependency>
</dependencies>
라이브러리는 다음과 같이 설치하였다.
2. application.properties
server.servlet.context-path=/picturePractice
server.port=9997
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/picturepractice
spring.datasource.username=
spring.datasource.password=
mybatis.mapper-locations=classpath:mappers/**/*.xml
#environment properties
#file.path=C:\\TempImage
file.path=/home/ubuntu/asset/picturePractice
secret.key=
프로젝트 명세서는 다음과 같이 작성하였다.
3. 이후 마이바티스를 위한 mapper.xml을 만들어 주면 된다.
4. 디렉터리 구성
728x90