forked from blcham/record-manager
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from kbss-cvut/84-migrate-to-yml
Migrate to yml
- Loading branch information
Showing
9 changed files
with
100 additions
and
91 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
server: | ||
servlet: | ||
context-path: /record-manager | ||
|
||
management: | ||
endpoints: | ||
web: | ||
exposure: | ||
include: health | ||
|
||
persistenceDriver: cz.cvut.kbss.ontodriver.rdf4j.Rdf4jDataSou# URL of repository that holds main data of the application | ||
|
||
repositoryUrl: http://localhost:7200/repositories/record-manager-app | ||
|
||
formGenRepositoryUrl: http://localhost:7200/repositories/record-manager-formgen | ||
|
||
formGenServiceUrl: http://localhost:8080/s-pipes/service?_pId=transform&sgovRepositoryUrl=https%3A%2F%2Fgraphdb.onto.fel.cvut.cz%2Frepositories%2Fkodi-slovnik-gov-cz | ||
|
||
security: | ||
sameSite: "" | ||
provider: internal | ||
oidc: | ||
roleClaim: realm_access.roles | ||
cors: | ||
allowedOrigins: "" | ||
|
||
appContext: http://localhost:3000/record-manager | ||
|
||
smtp: | ||
host: smtp.gmail.com | ||
port: 587 | ||
user: [email protected] | ||
password: AdminOrganization123 | ||
|
||
email: | ||
displayName: Record Manager | ||
from: "" | ||
replyTo: "" | ||
cc: "" | ||
bcc: "" | ||
passwordResetSubject: Password Reset | ||
passwordResetContent: >- | ||
<div><p>Dear user {{username}}, </p><p>please set your new password here: {{link}} </p><p>Best regards, <br>StudyManager</p></div> | ||
invitationSubject: Welcome to study | ||
invitationContent: >- | ||
<div><p>Dear {{name}}, </p><p>you have been invited to a study running at {{appContext}}. </p><p>Your username is: {{username}}. </p>\ | ||
<p>Please set your password here: {{link}} </p><p>Best regards, <br>StudyManager</p></div> | ||
passwordChangeSubject: Password Change | ||
passwordChangeContent: >- | ||
<div><p>Dear user {{username}}, </p><p>your password has been changed. </p><p>Best regards, <br>RecordManager</p></div> | ||
profileUpdateSubject: Profile updated by a study coordinator | ||
profileUpdateContent: >- | ||
<div><p>Dear user {{username}}, </p><p>your profile at {{appContext}} has been updated by a study coordinator. </p><p>Best regards, <br>RecordManager</p></div> | ||
records: | ||
allowedRejectReason: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/test/java/cz/cvut/kbss/study/persistence/ConfigDataApplicationContextInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cz.cvut.kbss.study.persistence; | ||
|
||
import org.springframework.boot.DefaultBootstrapContext; | ||
import org.springframework.boot.DefaultPropertiesPropertySource; | ||
import org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor; | ||
import org.springframework.boot.env.RandomValuePropertySource; | ||
import org.springframework.context.ApplicationContextInitializer; | ||
import org.springframework.context.ConfigurableApplicationContext; | ||
import org.springframework.core.env.ConfigurableEnvironment; | ||
|
||
public class ConfigDataApplicationContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> { | ||
public ConfigDataApplicationContextInitializer() { | ||
} | ||
|
||
public void initialize(ConfigurableApplicationContext applicationContext) { | ||
ConfigurableEnvironment environment = applicationContext.getEnvironment(); | ||
RandomValuePropertySource.addToEnvironment(environment); | ||
DefaultBootstrapContext bootstrapContext = new DefaultBootstrapContext(); | ||
ConfigDataEnvironmentPostProcessor.applyTo(environment, applicationContext, bootstrapContext, new String[0]); | ||
bootstrapContext.close(applicationContext); | ||
DefaultPropertiesPropertySource.moveToEnd(environment); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
persistenceDriver: cz.cvut.kbss.ontodriver.rdf4j.Rdf4jDataSource | ||
repositoryUrl: study-test-repository | ||
formGenRepositoryUrl: test-formGen-repository | ||
formGenServiceUrl: http://localhost:8081/formGenerator |