환경설정(프로젝트 생성시)
Lombok / MyBatis Framwork / Oracle Driver / Spring Web 추가
application.properties 환경설정 코드 추가
# port
server.port=80
# prefix and suffix
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
# oracle
spring.datasource.driverClassName=oracle.jdbc.driver.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@localhost:1521:xe
spring.datasource.username=spring
spring.datasource.password=spring123
# mybatis
mybatis.config-location=classpath:mybatis-config.xml
mybatis.mapper-locations=classpath:mapper/*.xml
-- 스프링부트 DB연동
select * from tab;
select * from seq;
create table boardtest(
no number primary key,
name varchar2(20),
subject varchar2(50),
content varchar2(1000),
register date
);
create sequence boardtest_seq;