works to the point of serving a hard-coded user via HTTPS (needs cert set up)
This commit is contained in:
parent
260c2f660b
commit
cf6e536aca
2 changed files with 54 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
package dev.activitypub.activitypubbot;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
/**
|
||||
* Object bound to "ap" prefix in {@link org.springframework.core.env.Environment}.
|
||||
*
|
||||
* @author Yvan Seth
|
||||
*/
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "ap")
|
||||
public class APProperties {
|
||||
|
||||
/**
|
||||
* Key File Path
|
||||
*/
|
||||
private String keyFilePath = "keyfile.pem";
|
||||
|
||||
/**
|
||||
* Server domain
|
||||
*/
|
||||
private String serverDomain = "activitypub.bot";
|
||||
|
||||
public String getKeyFilePath() {
|
||||
return keyFilePath;
|
||||
}
|
||||
public void setKeyFilePath(String keyFilePath) {
|
||||
this.keyFilePath = keyFilePath;
|
||||
}
|
||||
public String getServerDomain() {
|
||||
return serverDomain;
|
||||
}
|
||||
public void setServerDomain(String serverDomain) {
|
||||
this.serverDomain = serverDomain;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package dev.activitypub.activitypubbot;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
public class APPropertiesTests {
|
||||
|
||||
@Test
|
||||
public void testConfig() throws Exception {
|
||||
/*mvc.perform(MockMvcRequestBuilders.get("/").accept(MediaType.APPLICATION_JSON))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(content().string(equalTo("Parsnip!")));
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue