Skip to content

Commit

Permalink
- fixed logging
Browse files Browse the repository at this point in the history
- updated AuthConfiguration
  • Loading branch information
dartpopikyardo committed Oct 26, 2016
1 parent d168a8b commit ab1ba8b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void create(DispatchedEvent<AccountOpenedEvent> de) {
AccountOpenedEvent event = de.getEvent();
String id = de.getEntityId();
Int128 eventId = de.getEventId();
logger.info("**************** account version=" + id + ", " + eventId);
logger.info("**************** account version={}, {}", id, eventId);
BigDecimal initialBalance = event.getInitialBalance();

String customerId = event.getCustomerId();
Expand All @@ -58,8 +58,8 @@ public void recordTransfer(DispatchedEvent<MoneyTransferCreatedEvent> de) {
String moneyTransferId = de.getEntityId();
String fromAccountId = de.getEvent().getDetails().getFromAccountId();
String toAccountId = de.getEvent().getDetails().getToAccountId();
logger.info("**************** account version=" + fromAccountId + ", " + eventId);
logger.info("**************** account version=" + toAccountId + ", " + eventId);
logger.info("**************** account version={}, {}", fromAccountId, eventId);
logger.info("**************** account version={}, {}", toAccountId, eventId);

AccountTransactionInfo ti = new AccountTransactionInfo(moneyTransferId,
fromAccountId,
Expand Down Expand Up @@ -120,7 +120,7 @@ public <T extends AccountChangedEvent> void saveChange(DispatchedEvent<T> de, in
long balanceDelta = amount * delta;
AccountChangeInfo ci = new AccountChangeInfo(changeId, transactionId, de.getEvent().getClass().getSimpleName(), amount, balanceDelta);
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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,16 @@ public AuthenticationManager authenticationManagerBean() throws Exception {

@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
.httpBasic().and()
http
.csrf()
.disable()
.httpBasic()
.and()
.authorizeRequests()
.antMatchers("/index.html", "/", "/**.js", "/**.css").permitAll()
.antMatchers("/swagger-ui.html", "/v2/api-docs").permitAll()
.antMatchers(HttpMethod.POST, "/api/customers", "/api/login").permitAll()
.anyRequest().authenticated().and()
.antMatchers(HttpMethod.POST, "/api/customers", "/api/login").permitAll()
.antMatchers("/api/**").permitAll()
.anyRequest().permitAll()
.and()
.addFilterAfter(new StatelessAuthenticationFilter(tokenAuthenticationService), BasicAuthenticationFilter.class);
}

Expand Down

0 comments on commit ab1ba8b

Please sign in to comment.