1.添加安全登录功能
2.调整部分接口
This commit is contained in:
19
src/main/java/com/njcn/roma/config/Security.java
Normal file
19
src/main/java/com/njcn/roma/config/Security.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.njcn.roma.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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public class TestController {
|
||||
|
||||
|
||||
|
||||
for(int i=0;i<300;i++){
|
||||
for(int i=0;i<1000;i++){
|
||||
JSONObject map = JSONObject.parseObject(clientHandler.topicMsg);
|
||||
map.put("customDevId",clientHandler.devId);
|
||||
double vA = Double.valueOf(map.get("PhV_phsA").toString());
|
||||
@@ -160,6 +160,7 @@ public class TestController {
|
||||
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
//Thread.sleep(180000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user