@GetMapping("/list")
List<AuditAssetItem> getChangesByCriteria(
@RequestParam int assetid,
@RequestParam String from,
@RequestParam String to,
@RequestParam boolean item,
@RequestParam boolean rights,
@RequestParam boolean extended
) {
return service.getAuditListByCriteria(assetid, from, to, item, rights, extended);
}
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!--https://docs.spring.io/spring-boot/docs/2.7.6/reference/html/features.html#features.logging-->
<!--https://docs.spring.io/spring-boot/docs/2.7.6/reference/html/howto.html#howto.logging-->
<!--https://www.baeldung.com/spring-boot-logging-->
<!--https://github.com/spring-projects/spring-boot/blob/v2.7.6/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/-->
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
<property name="LOG" value="log-folder"/>
<appender name="ROLLING_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<Pattern>%d{yyyy-MM-dd HH:mm:ss} %p %logger : %m%n</Pattern>
<charset>${FILE_LOG_CHARSET}</charset>
</encoder>
<file>${LOG}/my-log-file.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG}/archived/my-log-file-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<cleanHistoryOnStart>${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false}</cleanHistoryOnStart>
<maxFileSize>${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB}</maxFileSize>
<totalSizeCap>${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0}</totalSizeCap>
<maxHistory>${LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-7}</maxHistory>
</rollingPolicy>
</appender>
<root level="info">
<appender-ref ref="CONSOLE"/>
</root>
<logger name="my-logger-name" level="info">
<appender-ref ref="ROLLING_FILE"/>
</logger>
</configuration>
static final Logger log = LoggerFactory.getLogger("my-logger-name");
/*
https://www.baeldung.com/spring-webflux-cors
https://www.baeldung.com/spring-cors
*/
package com.broadview.bvreportsgenerator.configuration;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.config.CorsRegistry;
import org.springframework.web.reactive.config.EnableWebFlux;
import org.springframework.web.reactive.config.WebFluxConfigurer;
@Configuration
@EnableWebFlux
public class CorsGlobalConfiguration implements WebFluxConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**");
}
}