Skip to content

Commit 040ed01

Browse files
committed
更改部署启动报错的代码
1 parent 250712f commit 040ed01

File tree

6 files changed

+319
-319
lines changed

6 files changed

+319
-319
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
package com.webank.wedatasphere.dss.orchestrator.server.service.impl;
2-
3-
import com.webank.wedatasphere.dss.orchestrator.server.service.OrchestratorService;
4-
import org.springframework.beans.factory.annotation.Autowired;
5-
import org.springframework.context.annotation.PropertySource;
6-
import org.springframework.scheduling.annotation.EnableScheduling;
7-
import org.springframework.scheduling.annotation.Scheduled;
8-
import org.springframework.stereotype.Component;
9-
10-
/**
11-
* Description
12-
*/
13-
@Component
14-
@EnableScheduling
15-
@PropertySource("classpath:dss-framework-orchestrator-server.properties")
16-
public class BatchClearCsTask {
17-
@Autowired
18-
OrchestratorService orchestratorService;
19-
20-
@Scheduled(cron = "${wds.dss.server.scheduling.clear.cs.cron}")
21-
public void batchClearCsTask(){
22-
orchestratorService.batchClearContextId();
23-
}
24-
}
1+
//package com.webank.wedatasphere.dss.orchestrator.server.service.impl;
2+
//
3+
//import com.webank.wedatasphere.dss.orchestrator.server.service.OrchestratorService;
4+
//import org.springframework.beans.factory.annotation.Autowired;
5+
//import org.springframework.context.annotation.PropertySource;
6+
//import org.springframework.scheduling.annotation.EnableScheduling;
7+
//import org.springframework.scheduling.annotation.Scheduled;
8+
//import org.springframework.stereotype.Component;
9+
//
10+
///**
11+
// * Description
12+
// */
13+
//@Component
14+
//@EnableScheduling
15+
//@PropertySource("classpath:dss-framework-orchestrator-server.properties")
16+
//public class BatchClearCsTask {
17+
// @Autowired
18+
// OrchestratorService orchestratorService;
19+
//
20+
// @Scheduled(cron = "${wds.dss.server.scheduling.clear.cs.cron}")
21+
// public void batchClearCsTask(){
22+
// orchestratorService.batchClearContextId();
23+
// }
24+
//}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package com.webank.wedatasphere.dss.framework.workspace.dao;
2-
3-
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4-
import com.webank.wedatasphere.dss.framework.workspace.bean.NoticeContent;
5-
import org.apache.ibatis.annotations.Mapper;
6-
7-
@Mapper
8-
public interface NoticeMapper extends BaseMapper<NoticeContent> {
9-
}
1+
//package com.webank.wedatasphere.dss.framework.workspace.dao;
2+
//
3+
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4+
//import com.webank.wedatasphere.dss.framework.workspace.bean.NoticeContent;
5+
//import org.apache.ibatis.annotations.Mapper;
6+
//
7+
//@Mapper
8+
//public interface NoticeMapper extends BaseMapper<NoticeContent> {
9+
//}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package com.webank.wedatasphere.dss.framework.workspace.service;
2-
3-
import com.webank.wedatasphere.dss.framework.workspace.bean.NoticeContent;
4-
5-
import java.util.List;
6-
7-
public interface NoticeService {
8-
9-
List<NoticeContent> getNoticeContent();
10-
11-
}
1+
//package com.webank.wedatasphere.dss.framework.workspace.service;
2+
//
3+
//import com.webank.wedatasphere.dss.framework.workspace.bean.NoticeContent;
4+
//
5+
//import java.util.List;
6+
//
7+
//public interface NoticeService {
8+
//
9+
// List<NoticeContent> getNoticeContent();
10+
//
11+
//}
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
package com.webank.wedatasphere.dss.framework.workspace.service.impl;
2-
3-
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4-
import com.webank.wedatasphere.dss.framework.workspace.bean.NoticeContent;
5-
import com.webank.wedatasphere.dss.framework.workspace.dao.NoticeMapper;
6-
import com.webank.wedatasphere.dss.framework.workspace.service.NoticeService;
7-
import org.springframework.beans.factory.annotation.Autowired;
8-
import org.springframework.stereotype.Service;
9-
10-
import java.util.Date;
11-
import java.util.List;
12-
13-
@Service
14-
public class NoticeServiceImpl implements NoticeService {
15-
16-
@Autowired
17-
private NoticeMapper noticeMapper;
18-
19-
@Override
20-
public List<NoticeContent> getNoticeContent() {
21-
QueryWrapper<NoticeContent> queryWrapper = new QueryWrapper<>();
22-
Date now = new Date();
23-
queryWrapper.gt("end_time", now);
24-
queryWrapper.orderByDesc("id");
25-
return noticeMapper.selectList(queryWrapper);
26-
}
27-
}
1+
//package com.webank.wedatasphere.dss.framework.workspace.service.impl;
2+
//
3+
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4+
//import com.webank.wedatasphere.dss.framework.workspace.bean.NoticeContent;
5+
//import com.webank.wedatasphere.dss.framework.workspace.dao.NoticeMapper;
6+
//import com.webank.wedatasphere.dss.framework.workspace.service.NoticeService;
7+
//import org.springframework.beans.factory.annotation.Autowired;
8+
//import org.springframework.stereotype.Service;
9+
//
10+
//import java.util.Date;
11+
//import java.util.List;
12+
//
13+
//@Service
14+
//public class NoticeServiceImpl implements NoticeService {
15+
//
16+
// @Autowired
17+
// private NoticeMapper noticeMapper;
18+
//
19+
// @Override
20+
// public List<NoticeContent> getNoticeContent() {
21+
// QueryWrapper<NoticeContent> queryWrapper = new QueryWrapper<>();
22+
// Date now = new Date();
23+
// queryWrapper.gt("end_time", now);
24+
// queryWrapper.orderByDesc("id");
25+
// return noticeMapper.selectList(queryWrapper);
26+
// }
27+
//}
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
1-
package com.webank.wedatasphere.dss.framework.workspace.restful;
2-
3-
import com.webank.wedatasphere.dss.framework.admin.service.DssAdminUserService;
4-
import lombok.SneakyThrows;
5-
import org.junit.jupiter.api.*;
6-
import org.springframework.boot.test.context.SpringBootTest;
7-
import org.springframework.boot.test.mock.mockito.MockBean;
8-
import org.springframework.test.web.servlet.MockMvc;
9-
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
10-
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
11-
import org.springframework.web.context.WebApplicationContext;
12-
13-
import javax.ws.rs.core.MediaType;
14-
15-
@TestMethodOrder(MethodOrderer.OrderAnnotation. class )
16-
@SpringBootTest(classes=com.webank.wedatasphere.dss.Application.class)
17-
//@AutoConfigureMockMvc
18-
class DSSWorkspaceUserRestfulTest {
19-
20-
// @Autowired
21-
private MockMvc mockMvc;
22-
23-
@MockBean
24-
private DssAdminUserService dssUserService;
25-
26-
@BeforeEach
27-
void before(WebApplicationContext context) {
28-
mockMvc = MockMvcBuilders.webAppContextSetup(context)
29-
.addFilter((request, response, chain) -> {
30-
response.setCharacterEncoding("UTF-8");
31-
chain.doFilter(request, response);
32-
}, "/*")
33-
.build();
34-
}
35-
@Order ( 2 )
36-
@SneakyThrows
37-
@org.junit.jupiter.api.Test
38-
void revokeUserRole() {
39-
String content = mockMvc.perform(MockMvcRequestBuilders.post("/dss/framework/workspace/revokeUserRole")
40-
.content("{\n" +
41-
" \"userName\": \"v_xiangbiaowu\",\n" +
42-
" \"workspaceIds\": [224],\n" +
43-
" \"roleIds\": [1,2,3]\n" +
44-
"}")
45-
.header("Token-Code", "HPMS-KhFGSQkdaaCPBYfE")
46-
.contentType(MediaType.APPLICATION_JSON)
47-
).andReturn().getResponse().getContentAsString();
48-
}
49-
@Order ( 1 )
50-
@SneakyThrows
51-
@Test
52-
void getWorkspaceUserRole() {
53-
String content = mockMvc.perform(MockMvcRequestBuilders.get("/dss/framework/workspace/getUserRole")
54-
.param("userName", "hadoop")
55-
.header("Token-Code", "HPMS-KhFGSQkdaaCPBYfE")
56-
.contentType("application/json")
57-
).andReturn().getResponse().getContentAsString();
58-
}
59-
60-
@Order ( 3 )
61-
@Test
62-
void getWorkspaceUserRole2() {
63-
getWorkspaceUserRole();
64-
}
65-
66-
}
1+
//package com.webank.wedatasphere.dss.framework.workspace.restful;
2+
//
3+
//import com.webank.wedatasphere.dss.framework.admin.service.DssAdminUserService;
4+
//import lombok.SneakyThrows;
5+
//import org.junit.jupiter.api.*;
6+
//import org.springframework.boot.test.context.SpringBootTest;
7+
//import org.springframework.boot.test.mock.mockito.MockBean;
8+
//import org.springframework.test.web.servlet.MockMvc;
9+
//import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
10+
//import org.springframework.test.web.servlet.setup.MockMvcBuilders;
11+
//import org.springframework.web.context.WebApplicationContext;
12+
//
13+
//import javax.ws.rs.core.MediaType;
14+
//
15+
//@TestMethodOrder(MethodOrderer.OrderAnnotation. class )
16+
//@SpringBootTest(classes=com.webank.wedatasphere.dss.Application.class)
17+
////@AutoConfigureMockMvc
18+
//class DSSWorkspaceUserRestfulTest {
19+
//
20+
//// @Autowired
21+
// private MockMvc mockMvc;
22+
//
23+
// @MockBean
24+
// private DssAdminUserService dssUserService;
25+
//
26+
// @BeforeEach
27+
// void before(WebApplicationContext context) {
28+
// mockMvc = MockMvcBuilders.webAppContextSetup(context)
29+
// .addFilter((request, response, chain) -> {
30+
// response.setCharacterEncoding("UTF-8");
31+
// chain.doFilter(request, response);
32+
// }, "/*")
33+
// .build();
34+
// }
35+
// @Order ( 2 )
36+
// @SneakyThrows
37+
// @org.junit.jupiter.api.Test
38+
// void revokeUserRole() {
39+
// String content = mockMvc.perform(MockMvcRequestBuilders.post("/dss/framework/workspace/revokeUserRole")
40+
// .content("{\n" +
41+
// " \"userName\": \"v_xiangbiaowu\",\n" +
42+
// " \"workspaceIds\": [224],\n" +
43+
// " \"roleIds\": [1,2,3]\n" +
44+
// "}")
45+
// .header("Token-Code", "HPMS-KhFGSQkdaaCPBYfE")
46+
// .contentType(MediaType.APPLICATION_JSON)
47+
// ).andReturn().getResponse().getContentAsString();
48+
// }
49+
// @Order ( 1 )
50+
// @SneakyThrows
51+
// @Test
52+
// void getWorkspaceUserRole() {
53+
// String content = mockMvc.perform(MockMvcRequestBuilders.get("/dss/framework/workspace/getUserRole")
54+
// .param("userName", "hadoop")
55+
// .header("Token-Code", "HPMS-KhFGSQkdaaCPBYfE")
56+
// .contentType("application/json")
57+
// ).andReturn().getResponse().getContentAsString();
58+
// }
59+
//
60+
// @Order ( 3 )
61+
// @Test
62+
// void getWorkspaceUserRole2() {
63+
// getWorkspaceUserRole();
64+
// }
65+
//
66+
//}

0 commit comments

Comments
 (0)