我试图在我使用的网址中传递accesstoken和pageid的值.任何想法如何正确地做到这一点?
<script type="text/javascript">
function makeUrl() {
var accesstoken = "12345679|bababashahahhahauauuaua";
var pageid = "<?php echo $page_id;?>";
$.ajax(
{
url: 'https://graph.facebook.com/?pageid/?access_token='+pageid+accesstoken,
statusCode: {......
Run Code Online (Sandbox Code Playgroud) 我正在使用查询(Solr Admin)通过我的HDFS中的两个文本文档搜索单词.如何检索找到该单词的文档的名称.我正在使用此项目https://github.com/lucidworks/hadoop-solr
我使用创建集合bin/solr -e cloud,我使用"data_driven_schema_configs"从服务器/ Solr的/ configsets /目录.
我tryied增加<field name="fileName" type="string" indexed="true" stored="true" /> 内部管理型模式在 〜/ Solr的-6.1.0 /服务器/ Solr的/ configsets/data_driven_schema_configs/conf目录,并改变它的名字到schema.xml中,但该目录中没有任何dataConfig文件添加<field column="file" name="fileName"/>为我在其他一些有类似问题的帖子中看到它,但不是SolrCloud,所以我不知道我的尝试是否正确.我需要做些什么改变,以及在哪些目录中能够实现它.
示例:我正在搜索两个文档中可以找到的"最大"一词.我怎样才能看到每个结果中的文件,sample1.txt或sample2.txt
在类外使用@RequestMapping批注的声明错误
我收到此错误消息:
java.lang.AssertionError: Status
Expected :200
Actual :404
Run Code Online (Sandbox Code Playgroud)
我的控制器就是这样
@Service
@RestController
@RequestMapping("/execute/files")
@ResponseBody
public class ControllerFiles {
@Autowired
@Qualifier("fileRunner")
ProcessRunnerInterface processRunnerInterfaceFiles;
public InputState executeRestFile(@RequestParam String name) throws ExecutionFailedException, URISyntaxException {
///code///
}
public List<String>....{
///code///
}
}
Run Code Online (Sandbox Code Playgroud)
我的测试
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
@AutoConfigureMockMvc
public class ControllerFilesTest {
@Autowired
private MockMvc mockMvc;
@Autowired
ControllerFiles controllerFiles;
@Test
public void testSpringMvcGetFiles() throws Exception {
this.mockMvc.perform(get("/execute/files").param("name", "Spring Community Files"))
.andDo(print()).andExpect(status().isOk());
}
}
Run Code Online (Sandbox Code Playgroud)
但是当我有这样的代码时,测试工作正常!
@Service
@RestController
public class ControllerFiles {
@Autowired
@Qualifier("fileRunner")
ProcessRunnerInterface processRunnerInterfaceFiles;
@RequestMapping("/execute/files")
@ResponseBody
public …Run Code Online (Sandbox Code Playgroud)