Skip to content

Commit

Permalink
Merge pull request #59 from oven-2023/feature/chat
Browse files Browse the repository at this point in the history
Feature/chat
  • Loading branch information
haen-su authored Nov 7, 2023
2 parents 2b65805 + 43e2fd0 commit 0669dba
Show file tree
Hide file tree
Showing 7 changed files with 408 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ out/
### MAC ###
.DS_Store

### crawling ###
/src/main/java/com/oven/server/api/work/controller/SaveRatingDataController.java
/src/main/java/com/oven/server/api/work/service/SaveRatingDataService.java

### application.yml ###
/src/main/resources/application-db.yml
/src/main/resources/application-security.yml
Expand Down
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ dependencies {
// swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.4'

// crawling
implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.1.2'

// querydsl
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}:jakarta"
implementation "com.querydsl:querydsl-core:${queryDslVersion}"
Expand Down
Binary file added chromedriver
Binary file not shown.
3 changes: 3 additions & 0 deletions config/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ server {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
}

if ($http_x_forwarded_proto != 'https') {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.oven.server.api.work.controller;

import com.oven.server.api.work.service.CrawlingService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@Tag(name = "Crawling", description = "크롤링용입니다 무시하세요")
public class CrawlingController {

private final CrawlingService crawlingService;

@Operation(summary = "무시하쇼 무시무시")
@GetMapping(value = "/crawling")
public void crawling() {
crawlingService.saveWork();
}

@Operation(summary = "무시하쇼 무시무시")
@GetMapping(value = "/writing")
public void writing() {
crawlingService.saveRatingFile();
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface ProviderRepository extends JpaRepository<Provider, Long> {

Optional<Provider> findByName(String providerName);

}
Loading

0 comments on commit 0669dba

Please sign in to comment.