Skip to content

Commit

Permalink
Merge pull request #39 from Ddareunging/fix/32
Browse files Browse the repository at this point in the history
[Feat] 프론트 연동
  • Loading branch information
0-x-14 authored May 9, 2024
2 parents c2befa5 + 22d2202 commit 3ec6881
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package ddareunging.ddareunging_server.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ApiTestController {
@RequestMapping(value = "/**/{path:[^.]*}")
public String redirect() {
return "forward:/index.html";
}
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
package ddareunging.ddareunging_server.web.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("")
public class LoginPageController {

@Value("${kakaoApi.serviceKey}")
private String client_id;

@Value("${kakaoApi.redirect_uri}")
private String redirect_uri;

@GetMapping("")
public String loginPage(Model model) {
String location = "https://kauth.kakao.com/oauth/authorize?response_type=code&client_id="+client_id+"&redirect_uri="+redirect_uri;
model.addAttribute("location", location);

return "login";
}

}
//package ddareunging.ddareunging_server.web.controller;
//
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Controller;
//import org.springframework.ui.Model;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//
//
//@Controller
//@RequestMapping("")
//public class LoginPageController {
//
// @Value("${kakaoApi.serviceKey}")
// private String client_id;
//
// @Value("${kakaoApi.redirect_uri}")
// private String redirect_uri;
//
// @GetMapping("")
// public String loginPage(Model model) {
// String location = "https://kauth.kakao.com/oauth/authorize?response_type=code&client_id="+client_id+"&redirect_uri="+redirect_uri;
// model.addAttribute("location", location);
//
// return "login";
// }
//
//}
12 changes: 11 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spring:
mode: HTML
encoding: UTF-8
cache: false
mvc:
pathmatch:
matching-strategy: ant_path_matcher

weatherApi:
serviceKey: ${weather.servicekey}
Expand All @@ -34,4 +37,11 @@ kakaoApi:

resources:
location: C:/Users/jooye/Ddareunging-Server/src/main/resources # 개발 환경
real.properties: # 운영 환경 추가해야 함
real.properties: # 운영 환경 추가해야 함

tmap:
api-key: ${tmap.apikey} #"tPLkF7VZBwIZSU1lW8N03zbLJTwYAGG3sEzLOQE6"

# REACT_APP_TMAP_API_KEY=tPLkF7VZBwIZSU1lW8N03zbLJTwYAGG3sEzLOQE6
# REACT_APP_KAKAO_REST_API_KEY=282f0bcb67baf674c825363575205734
# REACT_APP_KAKAO_REDIRECT_URI=http://localhost:3000/callback
2 changes: 2 additions & 0 deletions src/main/resources/static/css/224.869aedb9.chunk.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/main/resources/static/css/main.6c39f2a8.css

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions src/main/resources/static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<link rel="icon" href="/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="theme-color" content="#000000"/>
<meta name="description" content="Web site created using create-react-app"/>
<link rel="apple-touch-icon" href="/logo192.png"/>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css"/>
<link rel="manifest" href="/manifest.json"/>
<title>React App</title>
<script src="https://apis.openapi.sk.com/tmap/jsv2?version=1&appKey=yourAppKey"></script>
<script defer="defer" src="/js/main.9ae17e1c.js"></script>
<link href="/css/main.6c39f2a8.css" rel="stylesheet">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
2 changes: 2 additions & 0 deletions src/main/resources/static/js/224.3093597a.chunk.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/main/resources/static/js/453.51079d00.chunk.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/main/resources/static/js/main.9ae17e1c.js

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/public/detail_ex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3ec6881

Please sign in to comment.