- fixed logging
- updated AuthConfiguration
This commit is contained in:
@@ -36,7 +36,7 @@ public class AccountQueryWorkflow {
|
|||||||
AccountOpenedEvent event = de.getEvent();
|
AccountOpenedEvent event = de.getEvent();
|
||||||
String id = de.getEntityId();
|
String id = de.getEntityId();
|
||||||
Int128 eventId = de.getEventId();
|
Int128 eventId = de.getEventId();
|
||||||
logger.info("**************** account version=" + id + ", " + eventId);
|
logger.info("**************** account version={}, {}", id, eventId);
|
||||||
BigDecimal initialBalance = event.getInitialBalance();
|
BigDecimal initialBalance = event.getInitialBalance();
|
||||||
|
|
||||||
String customerId = event.getCustomerId();
|
String customerId = event.getCustomerId();
|
||||||
@@ -58,8 +58,8 @@ public class AccountQueryWorkflow {
|
|||||||
String moneyTransferId = de.getEntityId();
|
String moneyTransferId = de.getEntityId();
|
||||||
String fromAccountId = de.getEvent().getDetails().getFromAccountId();
|
String fromAccountId = de.getEvent().getDetails().getFromAccountId();
|
||||||
String toAccountId = de.getEvent().getDetails().getToAccountId();
|
String toAccountId = de.getEvent().getDetails().getToAccountId();
|
||||||
logger.info("**************** account version=" + fromAccountId + ", " + eventId);
|
logger.info("**************** account version={}, {}", fromAccountId, eventId);
|
||||||
logger.info("**************** account version=" + toAccountId + ", " + eventId);
|
logger.info("**************** account version={}, {}", toAccountId, eventId);
|
||||||
|
|
||||||
AccountTransactionInfo ti = new AccountTransactionInfo(moneyTransferId,
|
AccountTransactionInfo ti = new AccountTransactionInfo(moneyTransferId,
|
||||||
fromAccountId,
|
fromAccountId,
|
||||||
@@ -120,7 +120,7 @@ public class AccountQueryWorkflow {
|
|||||||
long balanceDelta = amount * delta;
|
long balanceDelta = amount * delta;
|
||||||
AccountChangeInfo ci = new AccountChangeInfo(changeId, transactionId, de.getEvent().getClass().getSimpleName(), amount, balanceDelta);
|
AccountChangeInfo ci = new AccountChangeInfo(changeId, transactionId, de.getEvent().getClass().getSimpleName(), amount, balanceDelta);
|
||||||
String accountId = de.getEntityId();
|
String accountId = de.getEntityId();
|
||||||
logger.info("**************** account version=" + accountId + ", " + de.getEventId().asString());
|
logger.info("**************** account version={}, {}", accountId, de.getEventId().asString());
|
||||||
|
|
||||||
accountInfoUpdateService.updateBalance(accountId, changeId, balanceDelta, ci);
|
accountInfoUpdateService.updateBalance(accountId, changeId, balanceDelta, ci);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,13 +66,16 @@ public class AuthConfiguration extends WebSecurityConfigurerAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
http.csrf().disable()
|
http
|
||||||
.httpBasic().and()
|
.csrf()
|
||||||
|
.disable()
|
||||||
|
.httpBasic()
|
||||||
|
.and()
|
||||||
.authorizeRequests()
|
.authorizeRequests()
|
||||||
.antMatchers("/index.html", "/", "/**.js", "/**.css").permitAll()
|
.antMatchers(HttpMethod.POST, "/api/customers", "/api/login").permitAll()
|
||||||
.antMatchers("/swagger-ui.html", "/v2/api-docs").permitAll()
|
.antMatchers("/api/**").permitAll()
|
||||||
.antMatchers(HttpMethod.POST, "/api/customers", "/api/login").permitAll()
|
.anyRequest().permitAll()
|
||||||
.anyRequest().authenticated().and()
|
.and()
|
||||||
.addFilterAfter(new StatelessAuthenticationFilter(tokenAuthenticationService), BasicAuthenticationFilter.class);
|
.addFilterAfter(new StatelessAuthenticationFilter(tokenAuthenticationService), BasicAuthenticationFilter.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user