forked from decentralized-identity/universal-resolver
-
Notifications
You must be signed in to change notification settings - Fork 0
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 decentralized-identity#304 from decentralized-iden…
…tity/change-configurations-to-yml Use yaml and annotation based configurations
- Loading branch information
Showing
18 changed files
with
464 additions
and
505 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 |
---|---|---|
|
@@ -6,7 +6,6 @@ MAINTAINER Markus Sabadello <[email protected]> | |
# build uni-resolver-web | ||
|
||
ADD . /opt/universal-resolver | ||
ADD config.json /opt/universal-resolver/uni-resolver-web/ | ||
RUN cd /opt/universal-resolver && mvn clean install -N | ||
RUN cd /opt/universal-resolver/uni-resolver-core && mvn clean install -N | ||
RUN cd /opt/universal-resolver/driver && mvn clean install -N | ||
|
@@ -22,7 +21,6 @@ MAINTAINER Markus Sabadello <[email protected]> | |
WORKDIR /opt/universal-resolver/uni-resolver-web/ | ||
|
||
COPY --from=build /opt/universal-resolver/uni-resolver-web/target/*-exec.jar ./ | ||
COPY --from=build /opt/universal-resolver/uni-resolver-web/config.json ./ | ||
|
||
ENV uniresolver_web_spring_profiles_active=default | ||
|
||
|
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
72 changes: 72 additions & 0 deletions
72
uni-resolver-web/src/main/java/uniresolver/web/config/DriverConfigs.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,72 @@ | ||
package uniresolver.web.config; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import java.util.List; | ||
import java.util.StringJoiner; | ||
|
||
@Configuration | ||
@ConfigurationProperties("uniresolver") | ||
public class DriverConfigs { | ||
|
||
private List<DriverConfig> drivers; | ||
|
||
public List<DriverConfig> getDrivers() { | ||
return drivers; | ||
} | ||
|
||
public void setDrivers(List<DriverConfig> drivers) { | ||
this.drivers = drivers; | ||
} | ||
|
||
public static class DriverConfig { | ||
|
||
private String pattern; | ||
private String url; | ||
private String propertiesEndpoint; | ||
private List<String> testIdentifiers; | ||
|
||
public String getPattern() { | ||
return pattern; | ||
} | ||
|
||
public void setPattern(String value) { | ||
this.pattern = value; | ||
} | ||
|
||
public String getURL() { | ||
return url; | ||
} | ||
|
||
public void setURL(String value) { | ||
this.url = value; | ||
} | ||
|
||
public String getPropertiesEndpoint() { | ||
return propertiesEndpoint; | ||
} | ||
|
||
public void setPropertiesEndpoint(String value) { | ||
this.propertiesEndpoint = value; | ||
} | ||
|
||
public List<String> getTestIdentifiers() { | ||
return testIdentifiers; | ||
} | ||
|
||
public void setTestIdentifiers(List<String> value) { | ||
this.testIdentifiers = value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new StringJoiner(", ", DriverConfig.class.getSimpleName() + "[", "]").add( | ||
"pattern='" + pattern + "'") | ||
.add("url='" + url + "'") | ||
.add("propertiesEndpoint='" + propertiesEndpoint + "'") | ||
.add("testIdentifiers=" + testIdentifiers) | ||
.toString(); | ||
} | ||
} | ||
} |
Oops, something went wrong.