├── .DS_Store ├── .gitignore ├── README.md ├── build.gradle ├── frontend ├── .DS_Store └── vue-search-place │ ├── .babelrc │ ├── .editorconfig │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .gitignore │ ├── .postcssrc.js │ ├── README.md │ ├── config │ ├── dev.env.js │ ├── index.js │ └── prod.env.js │ ├── index.html │ ├── package.json │ ├── src │ ├── App.vue │ ├── assets │ │ └── logo.png │ ├── components │ │ ├── member │ │ │ ├── Join.vue │ │ │ └── Login.vue │ │ └── search │ │ │ ├── Common.vue │ │ │ ├── History.vue │ │ │ ├── Popular.vue │ │ │ ├── Search.vue │ │ │ └── SearchView.vue │ ├── main.js │ ├── router │ │ └── index.js │ ├── service │ │ ├── index.js │ │ ├── joinAPI.js │ │ ├── loginAPI.js │ │ └── searchAPI.js │ └── store │ │ ├── actions.js │ │ ├── getters.js │ │ ├── index.js │ │ ├── mutation_types.js │ │ └── mutations.js │ ├── static │ └── .gitkeep │ └── yarn.lock ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle ├── springboot-webservice-1.0-SNAPSHOT.jar └── src ├── main ├── java │ └── com │ │ └── beingapple │ │ └── webservice │ │ ├── .DS_Store │ │ ├── Application.java │ │ ├── auth │ │ ├── BaseSecurityHandler.java │ │ ├── UserDetailsImpl.java │ │ ├── ajax │ │ │ ├── AjaxAuthenticationProvider.java │ │ │ ├── AjaxUserDetailsService.java │ │ │ ├── ApiLoginOperations.java │ │ │ └── filter │ │ │ │ └── AjaxAuthenticationFilter.java │ │ └── jwt │ │ │ ├── JwtAuthenticationProvider.java │ │ │ ├── JwtAuthenticationToken.java │ │ │ ├── JwtInfo.java │ │ │ ├── JwtUserDetailsService.java │ │ │ ├── filter │ │ │ └── JwtAuthenticationFilter.java │ │ │ └── matcher │ │ │ └── AuthenticationPathRequestMatcher.java │ │ ├── config │ │ ├── AsyncConfig.java │ │ ├── AuditingConfig.java │ │ ├── CommonConfig.java │ │ ├── SpringSecurityConfig.java │ │ ├── SwaggerConfig.java │ │ └── WebConfig.java │ │ ├── domain │ │ ├── BaseTimeEntity.java │ │ ├── History.java │ │ ├── HistoryRequestDTO.java │ │ ├── Member.java │ │ ├── MemberRequestDTO.java │ │ ├── Popular.java │ │ ├── PopularRequestDTO.java │ │ ├── Response.java │ │ └── Search.java │ │ ├── repository │ │ ├── HistoryRepository.java │ │ ├── MemberRepository.java │ │ └── PopularRepository.java │ │ ├── service │ │ ├── HistoryService.java │ │ ├── HistoryServiceImpl.java │ │ ├── MemberService.java │ │ ├── MemberServiceImpl.java │ │ ├── PageService.java │ │ ├── PopularService.java │ │ ├── PopularServiceImpl.java │ │ ├── SearchService.java │ │ └── SearchServiceImpl.java │ │ ├── util │ │ ├── DateUtil.java │ │ ├── JwtUtil.java │ │ └── MemberValidation.java │ │ └── web │ │ ├── CommonController.java │ │ ├── MemberController.java │ │ ├── SearchController.java │ │ └── SearchHistoryController.java └── resources │ ├── application.yml │ └── static │ ├── index.html │ └── static │ ├── css │ ├── app.5d77078c1c180ab742f441e5fffe573a.css │ └── app.5d77078c1c180ab742f441e5fffe573a.css.map │ └── js │ ├── app.43a8422c172b56127065.js │ ├── app.43a8422c172b56127065.js.map │ ├── manifest.2ae2e69a05c33dfc65f8.js │ ├── manifest.2ae2e69a05c33dfc65f8.js.map │ ├── vendor.53dd1aac5feeb4153a2a.js │ └── vendor.53dd1aac5feeb4153a2a.js.map └── test └── java └── com └── beingapple └── webservice └── web ├── MemberControllerTest.java └── SearchAndHistoryControllerTest.java /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BeingApple/java-SpringBoot-searchPlace/cafb5021d7adeedea563819507eb5b0ff9fdfdb3/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /build/ 3 | !gradle/wrapper/gradle-wrapper.jar 4 | /out 5 | 6 | ### STS ### 7 | .apt_generated 8 | .classpath 9 | .factorypath 10 | .project 11 | .settings 12 | .springBeans 13 | 14 | ### IntelliJ IDEA ### 15 | .idea 16 | *.iws 17 | *.iml 18 | *.ipr 19 | 20 | ### NetBeans ### 21 | nbproject/private/ 22 | build/ 23 | nbbuild/ 24 | dist/ 25 | nbdist/ 26 | .nb-gradle/ 27 | 28 | ### yarn ### 29 | node_modules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 스프링부트 기반 장소 검색 서비스 2 | 3 | Excutable jar 파일은 [여기](https://github.com/BeingApple/searchPlace-SpringBoot/raw/master/springboot-webservice-1.0-SNAPSHOT.jar)에서 다운로드 가능합니다. 4 | 5 | ## 사용한 외부 라이브러리 6 | * java-jwt 7 |
Spring security를 이용한 JWT 토크 기반 로그인 기능 구현에 사용하였습니다.
8 | * lombok
9 | JPA 및 domain에서 롬복 어노테이션을 통해 손쉬운 함수 생성 및 가독성을 위해 사용하였습니다.
10 | * swagger
11 | API 명세 페이지 출력을 위해 사용하였으며, /swagger-ui.html 에서 확인 가능합니다.
12 | * vue.js
13 | 프론트엔드에서 Javascript 기반의 SPA 구현을 위해 사용하였습니다.
14 | * axios
15 | 프론트엔드에서 API서버와 통신하기 위하여 사용하였습니다.
16 | * vue-moment
17 | 프론트엔드에서 검색 이력 페이지의 날짜 포맷을 변경하기 위하여 사용하였습니다.
18 | * Bootstrap
19 | 프론트엔드에서 페이지 디자인을 위하여 사용하였습니다.
20 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext{
3 | springBootVersion='2.1.6.RELEASE'
4 | }
5 | repositories {
6 | mavenCentral()
7 | }
8 | dependencies {
9 | classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
10 | classpath "io.spring.gradle:dependency-management-plugin:1.0.4.RELEASE"
11 | }
12 | }
13 |
14 | apply plugin: 'java'
15 | apply plugin: 'eclipse'
16 | apply plugin: 'org.springframework.boot'
17 | apply plugin: 'io.spring.dependency-management'
18 |
19 | group 'com.beingapple'
20 | version '1.0-SNAPSHOT'
21 |
22 | sourceCompatibility = 1.8
23 |
24 | jar {
25 | manifest {
26 | attributes 'Title': '장소 검색 서비스', 'Main-Class': 'com.beingapple.webservice.Application'
27 | }
28 | from {
29 | configurations.compile.collect {it.isDirectory()? it : zipTree(it)}
30 | }
31 | }
32 |
33 | repositories {
34 | mavenCentral()
35 | }
36 |
37 | //Spring Boot Overriding
38 | ext['hibernate.version'] = '5.2.11.Final'
39 |
40 | dependencies {
41 | compile('org.springframework.boot:spring-boot-starter-actuator')
42 | compile('org.springframework.boot:spring-boot-starter-data-jpa')
43 | compile('org.springframework.boot:spring-boot-starter-web')
44 | compile('org.springframework.boot:spring-boot-starter-security')
45 | compile('com.auth0:java-jwt:3.8.1')
46 | compile('io.springfox:springfox-swagger2:2.9.2')
47 | compile('io.springfox:springfox-swagger-ui:2.9.1')
48 |
49 | runtime('com.h2database:h2')
50 | compileOnly('org.projectlombok:lombok')
51 | testCompile('org.springframework.boot:spring-boot-starter-test')
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/frontend/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BeingApple/java-SpringBoot-searchPlace/cafb5021d7adeedea563819507eb5b0ff9fdfdb3/frontend/.DS_Store
--------------------------------------------------------------------------------
/frontend/vue-search-place/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-vue-jsx", "transform-runtime"]
12 | }
13 |
--------------------------------------------------------------------------------
/frontend/vue-search-place/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/frontend/vue-search-place/.eslintignore:
--------------------------------------------------------------------------------
1 | /build/
2 | /config/
3 | /dist/
4 | /*.js
5 |
--------------------------------------------------------------------------------
/frontend/vue-search-place/.eslintrc.js:
--------------------------------------------------------------------------------
1 | // https://eslint.org/docs/user-guide/configuring
2 |
3 | module.exports = {
4 | root: true,
5 | parserOptions: {
6 | parser: 'babel-eslint'
7 | },
8 | env: {
9 | browser: true,
10 | },
11 | extends: [
12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
14 | 'plugin:vue/essential',
15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md
16 | 'standard'
17 | ],
18 | // required to lint *.vue files
19 | plugins: [
20 | 'vue'
21 | ],
22 | // add your custom rules here
23 | rules: {
24 | // allow async-await
25 | 'generator-star-spacing': 'off',
26 | // allow debugger during development
27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/frontend/vue-search-place/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | /dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Editor directories and files
9 | .idea
10 | .vscode
11 | *.suo
12 | *.ntvs*
13 | *.njsproj
14 | *.sln
15 |
--------------------------------------------------------------------------------
/frontend/vue-search-place/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-import": {},
6 | "postcss-url": {},
7 | // to edit target browsers: use "browserslist" field in package.json
8 | "autoprefixer": {}
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/frontend/vue-search-place/README.md:
--------------------------------------------------------------------------------
1 | # vue-search-place
2 |
3 | > 장소 검색 서비스
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:8080
12 | npm run dev
13 |
14 | # build for production with minification
15 | npm run build
16 |
17 | # build for production and view the bundle analyzer report
18 | npm run build --report
19 | ```
20 |
21 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
22 |
--------------------------------------------------------------------------------
/frontend/vue-search-place/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/frontend/vue-search-place/config/index.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | // Template version: 1.3.1
3 | // see http://vuejs-templates.github.io/webpack for documentation.
4 |
5 | const path = require('path')
6 |
7 | module.exports = {
8 | dev: {
9 |
10 | // Paths
11 | assetsSubDirectory: 'static',
12 | assetsPublicPath: '/',
13 | proxyTable: {},
14 |
15 | // Various Dev Server settings
16 | host: 'localhost', // can be overwritten by process.env.HOST
17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
18 | autoOpenBrowser: false,
19 | errorOverlay: true,
20 | notifyOnErrors: true,
21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
22 |
23 | // Use Eslint Loader?
24 | // If true, your code will be linted during bundling and
25 | // linting errors and warnings will be shown in the console.
26 | useEslint: true,
27 | // If true, eslint errors and warnings will also be shown in the error overlay
28 | // in the browser.
29 | showEslintErrorsInOverlay: false,
30 |
31 | /**
32 | * Source Maps
33 | */
34 |
35 | // https://webpack.js.org/configuration/devtool/#development
36 | devtool: 'cheap-module-eval-source-map',
37 |
38 | // If you have problems debugging vue-files in devtools,
39 | // set this to false - it *may* help
40 | // https://vue-loader.vuejs.org/en/options.html#cachebusting
41 | cacheBusting: true,
42 |
43 | cssSourceMap: true
44 | },
45 |
46 | build: {
47 | // Template for index.html
48 | index: path.resolve(__dirname, '../../../src/main/resources/static/index.html'),
49 |
50 | // Paths
51 | assetsRoot: path.resolve(__dirname, '../../../src/main/resources/static'),
52 | assetsSubDirectory: 'static',
53 | assetsPublicPath: '/',
54 |
55 | /**
56 | * Source Maps
57 | */
58 |
59 | productionSourceMap: true,
60 | // https://webpack.js.org/configuration/devtool/#production
61 | devtool: '#source-map',
62 |
63 | // Gzip off by default as many popular static hosts such as
64 | // Surge or Netlify already gzip all static assets for you.
65 | // Before setting to `true`, make sure to:
66 | // npm install --save-dev compression-webpack-plugin
67 | productionGzip: false,
68 | productionGzipExtensions: ['js', 'css'],
69 |
70 | // Run the build command with an extra argument to
71 | // View the bundle analyzer report after build finishes:
72 | // `npm run build --report`
73 | // Set to `true` or `false` to always turn it on or off
74 | bundleAnalyzerReport: process.env.npm_config_report
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/frontend/vue-search-place/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/frontend/vue-search-place/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
5 | {{item.keyword}}
5 | {{index + 1}}위
5 |
주소 : {{detail.address_name}}
10 |전화번호 : {{detail.phone}}
11 | 지도 확인하기 12 |