Kaynağa Gözat

no message

production
ebeveyn
işleme
02811c401b
3 değiştirilmiş dosya ile 9 ekleme ve 3 silme
  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/ClientPresenceController.kt
  3. +6
    -1
      src/main/resources/application-db-toa.yml

+ 2
- 0
src/main/java/com/ffii/fpsms/config/security/SecurityConfig.java Dosyayı Görüntüle

@@ -91,6 +91,8 @@ public class SecurityConfig {
.hasAnyAuthority("TESTING", "ADMIN", "STOCK")
.requestMatchers(HttpMethod.GET, "/product-process/Demo/Process/alerts/fg-qc-putaway")
.hasAuthority("TESTING")
.requestMatchers(HttpMethod.GET, "/device-presence/ping").authenticated()
.requestMatchers(HttpMethod.POST, "/device-presence/heartbeat").authenticated()
.requestMatchers(HttpMethod.GET, "/device-presence/active")
.hasAnyAuthority("TESTING", "ADMIN")
.requestMatchers(HttpMethod.GET, "/device-presence/history")


+ 1
- 2
src/main/java/com/ffii/fpsms/modules/monitoring/web/ClientPresenceController.kt Dosyayı Görüntüle

@@ -3,7 +3,6 @@ package com.ffii.fpsms.modules.monitoring.web
import com.ffii.core.exception.BadRequestException
import com.ffii.fpsms.modules.common.SecurityUtils
import com.ffii.fpsms.modules.monitoring.service.ClientPresenceService
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
@@ -16,9 +15,9 @@ import java.time.LocalDate
import java.time.LocalDateTime
import java.time.format.DateTimeParseException

/** Always registered so client heartbeats work whenever the frontend reporter is enabled. */
@RestController
@RequestMapping("/device-presence")
@ConditionalOnProperty(prefix = "fpsms.monitoring", name = ["enabled"], havingValue = "true")
class ClientPresenceController(
private val clientPresenceService: ClientPresenceService,
) {


+ 6
- 1
src/main/resources/application-db-toa.yml Dosyayı Görüntüle

@@ -2,4 +2,9 @@ spring:
datasource:
jdbc-url: jdbc:mysql://10.100.0.81:3006/fpsmsdb?useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8
username: root
password: secret
password: secret

# TOA deployments: enable heartbeat scanners + printer checks (same as prod).
fpsms:
monitoring:
enabled: true

Yükleniyor…
İptal
Kaydet