소스 검색

no message

production
[email protected] 3 시간 전
부모
커밋
88136da489
4개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. +2
    -0
      src/main/java/com/ffii/fpsms/config/security/SecurityConfig.java
  2. +1
    -2
      src/main/java/com/ffii/fpsms/modules/monitoring/web/LabelPrinterMonitorController.kt
  3. +1
    -2
      src/main/java/com/ffii/fpsms/modules/monitoring/web/PrinterMonitorController.kt
  4. +2
    -1
      src/main/resources/application-db-local.yml

+ 2
- 0
src/main/java/com/ffii/fpsms/config/security/SecurityConfig.java 파일 보기

@@ -109,6 +109,8 @@ public class SecurityConfig {
.hasAnyAuthority("TESTING", "ADMIN")
.requestMatchers(HttpMethod.GET, "/label-printer-monitor/label-stats")
.hasAnyAuthority("TESTING", "ADMIN")
.requestMatchers(HttpMethod.GET, "/label-printer-monitor/odometer-stats")
.hasAnyAuthority("TESTING", "ADMIN")
.requestMatchers(HttpMethod.POST, "/stockAdjustment/submit")
.hasAnyAuthority("ADMIN", "INVENTORY_ADJUST")
.anyRequest().authenticated())


+ 1
- 2
src/main/java/com/ffii/fpsms/modules/monitoring/web/LabelPrinterMonitorController.kt 파일 보기

@@ -1,7 +1,6 @@
package com.ffii.fpsms.modules.monitoring.web

import com.ffii.fpsms.modules.monitoring.service.LabelPrinterMonitorService
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PostMapping
@@ -12,9 +11,9 @@ import java.time.LocalDate
import java.time.LocalDateTime
import java.time.format.DateTimeParseException

/** Always registered so the monitor UI can probe label printers on demand (schedulers stay profile-gated). */
@RestController
@RequestMapping("/label-printer-monitor")
@ConditionalOnProperty(prefix = "fpsms.monitoring", name = ["enabled"], havingValue = "true")
class LabelPrinterMonitorController(
private val labelPrinterMonitorService: LabelPrinterMonitorService,
) {


+ 1
- 2
src/main/java/com/ffii/fpsms/modules/monitoring/web/PrinterMonitorController.kt 파일 보기

@@ -1,7 +1,6 @@
package com.ffii.fpsms.modules.monitoring.web

import com.ffii.fpsms.modules.monitoring.service.PrinterMonitorService
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PostMapping
@@ -12,9 +11,9 @@ import java.time.LocalDate
import java.time.LocalDateTime
import java.time.format.DateTimeParseException

/** Always registered so the monitor UI can probe printers on demand (schedulers stay profile-gated). */
@RestController
@RequestMapping("/printer-monitor")
@ConditionalOnProperty(prefix = "fpsms.monitoring", name = ["enabled"], havingValue = "true")
class PrinterMonitorController(
private val printerMonitorService: PrinterMonitorService,
) {


+ 2
- 1
src/main/resources/application-db-local.yml 파일 보기

@@ -4,7 +4,8 @@ spring:
username: root
password: secret

# Monitoring off for local dev (prod only). To test: enabled true + frontend NEXT_PUBLIC_MONITORING_ENABLED=true.
# Monitoring off for local dev (prod only). Printer/device monitor APIs are always registered;
# background schedulers only run when enabled is true.
fpsms:
monitoring:
enabled: false

불러오는 중...
취소
저장