我的 NextJS 应用程序如下:
应用程序/page.js
'use client';
import React from 'react';
export default function Home() {
return (<div>Testing</div>);
}
Run Code Online (Sandbox Code Playgroud)
应用程序/layout.js
export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
Run Code Online (Sandbox Code Playgroud)
当我跑步时
next dev
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
error - node_modules/next/dist/build/webpack/loaders/next-flight-loader/module-proxy.js (56:14) @ Object.get
error - Error: Cannot access default.then on the server. You cannot dot into a client module from a server component. You can only pass …Run Code Online (Sandbox Code Playgroud) 我目前正在开发一个具有JFrame始终存在的主要工作的应用程序.我现在有一个孩子JDialog出现在按钮上.该框架具有JMenu"退出显示器"的项目.当我JDialog按下显示选项的注销时,我的任务是确保这个孩子消失.注销发生时,主显示器通过以下方式设置为不可见:
mainFrame.setVisible(false);
Run Code Online (Sandbox Code Playgroud)
子JDialog具有默认的关闭操作:
DISPONSE_ON_CLOSE
Run Code Online (Sandbox Code Playgroud)
当用户重新登录时,首先要做的是:
mainFrame.setVisible(true);
Run Code Online (Sandbox Code Playgroud)
发生这种情况时,子对话框会显示备份.看看JDialogJavadoc,这似乎是预期的行为.然而,我还没有找到一种方法来打破父母/孩子的关系或完全摧毁孩子JDialog.它似乎JDialog仍然存在,直到它是GC,这可能不会及时发生.
这是一个模拟我所看到的行为的示例程序:
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JToggleButton;
import javax.swing.SwingUtilities;
public class WindowTest {
public static void createAndShowGUI() {
JFrame aFrame = new JFrame("LAUNCHER");
final JFrame aParent = new JFrame("PARENT");
final JDialog aChild = new JDialog(aParent);
aParent.setSize(200,200);
final JToggleButton showParentButton = new JToggleButton("HIDE");
showParentButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
showParentButton.setText(!showParentButton.isSelected() …Run Code Online (Sandbox Code Playgroud) 我目前在同一台机器上运行 Elasticsearch 6.2.2 版和 Apache Nifi 1.5.0 版。我正在尝试遵循位于以下位置的 Nifi 示例:https ://community.hortonworks.com/articles/52856/stream-data-into-hive-like-a-king-using-nifi.html除了不是存储到 Hive ,我想存储到Elasticsearch。
最初我尝试使用 PutElasticsearch5 处理器,但在 Elasticsearch 上出现以下错误:
Received message from unsupported version: [5.0.0] minimal compatible version is: [5.6.0]
Run Code Online (Sandbox Code Playgroud)
当我尝试使用谷歌搜索此错误消息时,似乎共识是使用 PutElasticsearchHttp 处理器。我的 Nifi 看起来像:

以及 PutElasticsearchHttp 处理器的配置:

当流文件到达 PutElasticsearchHttp 处理器时,会出现以下错误: 
PutElasticSearchHttp failed to insert StandardFlowFileRecord into Elasticsearch due to , transferring to failure.
Run Code Online (Sandbox Code Playgroud)
原因似乎是空白/空。Elasticsearch 日志中也没有任何内容。
在 ConvertAvroToJson 之后,数据是一个 JSON 数组,所有条目都在一行上。这是一个示例值:
{"City": "Athens",
"Edition": 1896,
"Sport": "Aquatics",
"sub_sport": "Swimming",
"Athlete": "HAJOS, Alfred",
"country": "HUN",
"Gender": "Men",
"Event": "100m freestyle",
"Event_gender": …Run Code Online (Sandbox Code Playgroud) apache-nifi ×1
java ×1
javascript ×1
jdialog ×1
next.js ×1
node.js ×1
reactjs ×1
swing ×1
webpack ×1