package com.juick.server.configuration; import com.juick.server.KeystoreManager; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.Resource; import java.io.IOException; @Configuration public class TestActivityConfiguration { @Value("classpath:test.p12") Resource keystoreFile; @Bean public KeystoreManager testKeystoreManager() throws IOException { return new KeystoreManager(keystoreFile.getFile().getAbsolutePath(), "secret"); } }