1.添加登录模块
This commit is contained in:
@@ -19,7 +19,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
||||
@EnableAsync
|
||||
@DependsOn("proxyMapperRegister")
|
||||
@MapperScan("com.njcn.**.mapper")
|
||||
@SpringBootApplication(scanBasePackages = "com.njcn", exclude = {SecurityAutoConfiguration.class, SecurityFilterAutoConfiguration.class})
|
||||
@SpringBootApplication(scanBasePackages = "com.njcn")
|
||||
public class InfluxDataApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.njcn.influx.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
public class Security extends WebSecurityConfigurerAdapter {
|
||||
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.formLogin().and().authorizeRequests().anyRequest().authenticated().and().csrf().disable();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -48,14 +48,14 @@ public class OracleToInfluxDBJob {
|
||||
|
||||
//每小时03分钟时执行上一个小时的数据同步
|
||||
//河北这边比较特殊,
|
||||
@Scheduled(cron="0 40 * * * ?")
|
||||
@Scheduled(cron="0 15 * * * ?")
|
||||
public void executeHours() {
|
||||
DataAsynParam dataAsynParam = new DataAsynParam();
|
||||
// 获取当前时间
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
|
||||
// 减去一个小时
|
||||
LocalDateTime oneHourAgo = now.minusHours(1);
|
||||
LocalDateTime oneHourAgo = now.minusHours(2);
|
||||
|
||||
// 将分钟和秒设置为0
|
||||
LocalDateTime result = oneHourAgo.truncatedTo(ChronoUnit.HOURS);
|
||||
@@ -116,8 +116,8 @@ public class OracleToInfluxDBJob {
|
||||
* 每天同步台账监测点部分信息 仅数据中心使用
|
||||
* @date 2024/3/5
|
||||
*/
|
||||
@Scheduled(cron="0 30 0 * * ?")
|
||||
/* @Scheduled(cron="0 30 0 * * ?")
|
||||
public void synLedgerMonitor() {
|
||||
oracleMonitorStatusToMysqlService.monitorTimeSync();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user