본문 바로가기

개인 연습

dd

728x90

빌드.그래들

plugins {
   id 'org.springframework.boot' version '2.7.0'
   id 'io.spring.dependency-management' version '1.0.11.RELEASE'
   id 'java'
}

group = 'test1'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'

configurations {
   compileOnly {
      extendsFrom annotationProcessor
   }
}

repositories {
   mavenCentral()
}

dependencies {
   implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
   implementation 'org.springframework.boot:spring-boot-starter-web'
   implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.2'
   compileOnly 'org.projectlombok:lombok'
   runtimeOnly 'com.oracle.database.jdbc:ojdbc8'
   annotationProcessor 'org.projectlombok:lombok'
   testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('test') {
   useJUnitPlatform()
}

 

.프로퍼티

server.port=9091
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
#spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@localhost:1521/xe
spring.datasource.username=scott
spring.datasource.password=tiger

# MyBatis
# mapper.xml 위치 지정
mybatis.mapper-locations= mybatis-mapper/**.xml

 

@Mapper
public interface Dao {

    public void insert(HashMap<String,String> param);
    public ArrayList<Dto> list();
}

 

@MapperScan("test1.demo.mapper")
@SpringBootApplication
public class DemoApplication {

   public static void main(String[] args) {
      SpringApplication.run(DemoApplication.class, args);
   }

}

 

 

<html xmlns:th="http://www.thymeleaf.org">

728x90

'개인 연습' 카테고리의 다른 글

인텔리제이 단축키  (0) 2022.05.18
배열 중복 값 없애기  (0) 2022.05.11
simpleDateFormat으로 변환해서 넘긴 값 Timestamp로 받기  (0) 2022.05.03
  (0) 2022.04.14
게시판 - 로그인, 회원가입, 회원정보수정  (0) 2022.03.26