푸시메시지 기능 추가 - 전체, 개별, 라이브 생성, 라이브 시작, 메시지 전송, 콘텐츠 업로드
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package kr.co.vividnext.sodalive.configs
|
||||
|
||||
import com.google.auth.oauth2.GoogleCredentials
|
||||
import com.google.firebase.FirebaseApp
|
||||
import com.google.firebase.FirebaseOptions
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import java.io.FileInputStream
|
||||
import javax.annotation.PostConstruct
|
||||
|
||||
@Configuration
|
||||
class FirebaseConfig(
|
||||
@Value("\${firebase.secret-key-path}")
|
||||
private val secretKeyPath: String
|
||||
) {
|
||||
|
||||
@PostConstruct
|
||||
fun initialize() {
|
||||
FirebaseOptions.builder()
|
||||
.setCredentials(GoogleCredentials.fromStream(FileInputStream(secretKeyPath)))
|
||||
.build()
|
||||
|
||||
FirebaseApp.initializeApp()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user