728x90

Back-End: Spring Boot
1 ํ๋ก์ ํธ ์์ฑํ๊ธฐ



2 application.properties ํ์ผ ์ค์

server.port=8888
# oracle set
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
# oracle 9 ์ดํ ๋ฒ์ ์ driver-class-name์
# oracle.jdbc.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@localhost:1521/xe
spring.datasource.username=๊ณ์ ์ด๋ฆ
spring.datasource.password=๊ณ์ ๋น๋ฐ๋ฒํธ
# loc setting for image storage
spring.servlet.multipart.location=C:\\img
# encoding
#server.servlet.encoding.charset=EUC-KR
server.servlet.encoding.charset=UTF-8
server.servlet.encoding.enabled=true
server.servlet.encoding.force=true
#jpa
spring.jpa.generate-ddl=true
spring.jpa.database=oracle
spring.jpa.show-sql=true
3. ํ ์คํธ



Front-End: Vue.js
1. Vue ํ๋ก์ ํธ ์์ฑ
# Spring ํ๋ก์ ํธ ๋ด๋ถ์ Vue ํ๋ก์ ํธ ์์ฑ
ํ๋ก์ ํธ๊ฒฝ๋ก> vue create front

2. ๋น๋ path ์ค์
// Vue project์ ๋น๋ Path๋ฅผ ์ง์ ํ๋ ์๋ฐ ์คํฌ๋ฆฝํธ ํ์ผ ์์ฑ
// vue.config.js
module.exports = {
outputDir: "../src/main/resources/static",
indexPath: "../static/index.html",
devServer: {
proxy: "http://localhost:8888" // ์คํ๋ง๋ถํธ ์ฃผ์
}
};
3. Vue ํ๋ก์ ํธ ๋น๋
# ์์น: ํ๋ก์ ํธ๊ฒฝ๋ก/front
# ๋น๋
npm run build
# ๋น๋ ํ src/main/resource/static ํด๋ ๋ด ๋น๋๋ ํ์ผ์ด ์๊ธด๋ค.
# ์ถ๊ฐ ํ๋ก๊ทธ๋จ ์ค์น
npm i vue-router --save
npm install --save axios
4. Vue ํ๋ก์ ํธ ์คํ
npm run serve

ํฌํธ 8081 (vue) ๋๋ ํฌํธ 8888 (spring boot) ๋ก ์ ์ํ๋ฉด indexํ์ด์ง๋ฅผ ํ์ธํ ์ ์๋ค.

728x90
'๐ ํ๋ก์ ํธ > 2021-06' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
ํ์คํ ๋ฆฌ (0) | 2021.06.11 |
---|---|
์๊ฐํด๋ณด๊ธฐ (0) | 2021.06.08 |
๊ฐ๋ฐ ํ๊ฒฝ ์ค์ ํ๊ธฐ (0) | 2021.06.04 |
์น ํ ์ด ํ๋ก์ ํธ - ๊ธฐํ (0) | 2021.06.03 |