Skip to content

Commit

Permalink
Apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pavetok committed Sep 30, 2023
1 parent 8d1d528 commit 31252fd
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 22 deletions.
16 changes: 8 additions & 8 deletions apps/foo/src/main/java/smecalculus/bezmen/construction/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
@Configuration(proxyBeanMethods = false)
@Import({ConfigBeans.class, ValidationBeans.class, MessagingBeans.class, StorageBeans.class})
@ImportAutoConfiguration({
JacksonAutoConfiguration.class,
EndpointAutoConfiguration.class,
WebEndpointAutoConfiguration.class,
HealthEndpointAutoConfiguration.class,
ManagementContextAutoConfiguration.class,
ServletManagementContextAutoConfiguration.class,
ObservationAutoConfiguration.class,
WebMvcObservationAutoConfiguration.class
JacksonAutoConfiguration.class,
EndpointAutoConfiguration.class,
WebEndpointAutoConfiguration.class,
HealthEndpointAutoConfiguration.class,
ManagementContextAutoConfiguration.class,
ServletManagementContextAutoConfiguration.class,
ObservationAutoConfiguration.class,
WebMvcObservationAutoConfiguration.class
})
public class App {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ public SepulkaDao underTest(SepulkaRecMapper recMapper, SepulkaRepository reposi
@Bean
public StorageProps storageProps() {
return StorageProps.builder()
.mappingProps(StateMappingProps.builder().mappingMode(SPRING_DATA).build())
.protocolProps(StorageProtocolProps.builder().protocolMode(POSTGRES).build())
.mappingProps(
StateMappingProps.builder().mappingMode(SPRING_DATA).build())
.protocolProps(StorageProtocolProps.builder()
.protocolMode(POSTGRES)
.build())
.build();
}
}
Expand All @@ -81,8 +84,11 @@ public SepulkaDao underTest(SepulkaRecMapper recMapper, SepulkaSqlMapper sqlMapp
@Bean
public StorageProps storageProps() {
return StorageProps.builder()
.mappingProps(StateMappingProps.builder().mappingMode(MY_BATIS).build())
.protocolProps(StorageProtocolProps.builder().protocolMode(POSTGRES).build())
.mappingProps(
StateMappingProps.builder().mappingMode(MY_BATIS).build())
.protocolProps(StorageProtocolProps.builder()
.protocolMode(POSTGRES)
.build())
.build();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
public class MessagingPropsEg {
public static class Builders {
public static MessagingProps.Builder messagingProps() {
return MessagingProps.builder().protocolProps(messagingProtocolProps().build());
return MessagingProps.builder()
.protocolProps(messagingProtocolProps().build());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class MessageMappingModeCondition implements ConfigurationCondition {

@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
Map<String, Object> attributes = metadata.getAnnotationAttributes(ConditionalOnMessageMappingMode.class.getName());
Map<String, Object> attributes =
metadata.getAnnotationAttributes(ConditionalOnMessageMappingMode.class.getName());
MessageMappingMode mode = (MessageMappingMode) attributes.get("value");
MessagingProps messagingProps = context.getBeanFactory().getBean(MessagingProps.class);
if (!messagingProps.protocolProps().protocolModes().contains(HTTP)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
@ImportAutoConfiguration({
ServletWebServerFactoryAutoConfiguration.class,
DispatcherServletAutoConfiguration.class
})
public class ProtocolHttpBeans {
}
@ImportAutoConfiguration({ServletWebServerFactoryAutoConfiguration.class, DispatcherServletAutoConfiguration.class})
public class ProtocolHttpBeans {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
import lombok.NonNull;

@Builder
public record StorageProtocolProps(@NonNull StorageProtocolMode protocolMode, @Nullable H2Props h2Props, @Nullable PostgresProps postgresProps) {}
public record StorageProtocolProps(
@NonNull StorageProtocolMode protocolMode, @Nullable H2Props h2Props, @Nullable PostgresProps postgresProps) {}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class StateMappingModeCondition implements ConfigurationCondition {

@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
Map<String, Object> attributes = metadata.getAnnotationAttributes(ConditionalOnStateMappingMode.class.getName());
Map<String, Object> attributes =
metadata.getAnnotationAttributes(ConditionalOnStateMappingMode.class.getName());
StateMappingMode mode = (StateMappingMode) attributes.get("value");
StorageProps props = context.getBeanFactory().getBean(StorageProps.class);
return mode == props.mappingProps().mappingMode();
Expand Down

0 comments on commit 31252fd

Please sign in to comment.