add config parameter
This commit is contained in:
parent
1958e01d01
commit
4c43776528
@ -15,6 +15,16 @@ public class ApplicationProperties {
|
|||||||
private String undeadUserLogin;
|
private String undeadUserLogin;
|
||||||
private boolean devMode;
|
private boolean devMode;
|
||||||
|
|
||||||
|
private boolean useHttps;
|
||||||
|
|
||||||
|
public boolean isUseHttps() {
|
||||||
|
return useHttps;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUseHttps(boolean useHttps) {
|
||||||
|
this.useHttps = useHttps;
|
||||||
|
}
|
||||||
|
|
||||||
public String getBaseUrl() {
|
public String getBaseUrl() {
|
||||||
return baseUrl;
|
return baseUrl;
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
|
|||||||
.deleteCookies(Constants.COOKIES_NAME)
|
.deleteCookies(Constants.COOKIES_NAME)
|
||||||
.permitAll();
|
.permitAll();
|
||||||
}
|
}
|
||||||
|
if (applicationProperties.isUseHttps()) {
|
||||||
http.portMapper()
|
http.portMapper()
|
||||||
.http(httpPort)
|
.http(httpPort)
|
||||||
.mapsTo(httpsPort)
|
.mapsTo(httpsPort)
|
||||||
@ -95,6 +96,8 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
|
|||||||
.requiresSecure();
|
.requiresSecure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configure(WebSecurity web) {
|
public void configure(WebSecurity web) {
|
||||||
web.ignoring()
|
web.ignoring()
|
||||||
|
@ -18,8 +18,7 @@ public class StrategyEntityCreateExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//@Scheduled(cron = "0 0 8 * * *")
|
@Scheduled(cron = "0 0 8 * * *")
|
||||||
@Scheduled(cron = "0 */5 * * * *")
|
|
||||||
public void scheduleExecuteStrategies() {
|
public void scheduleExecuteStrategies() {
|
||||||
entityCreateStrategies.forEach(strategy -> strategy.createEntityIfNeed(userService.findAll()));
|
entityCreateStrategies.forEach(strategy -> strategy.createEntityIfNeed(userService.findAll()));
|
||||||
}
|
}
|
||||||
|
@ -35,3 +35,4 @@ liquibase.change-log=classpath:db/changelog-master.xml
|
|||||||
ng-tracker.base-url=https://127.0.0.1:8443
|
ng-tracker.base-url=https://127.0.0.1:8443
|
||||||
ng-tracker.undead-user-login=admin
|
ng-tracker.undead-user-login=admin
|
||||||
ng-tracker.dev-mode=true
|
ng-tracker.dev-mode=true
|
||||||
|
ng-tracker.use-https=false
|
11
src/main/resources/db/changelog-20181108_000000-data.xml
Normal file
11
src/main/resources/db/changelog-20181108_000000-data.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
||||||
|
<changeSet author="orion" id="20181108_000000-1">
|
||||||
|
<sql>
|
||||||
|
update users
|
||||||
|
set email = 'romanov73@gmail.com' where id = 1;
|
||||||
|
</sql>
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
@ -13,4 +13,5 @@
|
|||||||
<include file="db/changelog-20180505_000000-schema.xml"/>
|
<include file="db/changelog-20180505_000000-schema.xml"/>
|
||||||
<include file="db/changelog-20181027_000000-schema.xml"/>
|
<include file="db/changelog-20181027_000000-schema.xml"/>
|
||||||
<include file="db/changelog-20181030_000000-schema.xml"/>
|
<include file="db/changelog-20181030_000000-schema.xml"/>
|
||||||
|
<include file="db/changelog-20181108_000000-data.xml"/>
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
Loading…
Reference in New Issue
Block a user