Javascript Spring引导(在reactjs中插入脚本)

Javascript Spring引导(在reactjs中插入脚本),javascript,spring,reactjs,spring-boot,Javascript,Spring,Reactjs,Spring Boot,我真的很难弄清楚我可能会做错什么,因为可能大多数场景都经过了测试 我正在使用SpringBoot和ReactJS为前端编写web应用程序。我现在正试图编写一个简单的脚本,显示一些从单独的文件导入到html文件的纯文本。这样做之后,我最终什么也没出现 以下是我的项目结构: 下面是我的app.js,其中定义了我的组件: var CommentBox = React.createClass({ render: function() { return ( <div clas

我真的很难弄清楚我可能会做错什么,因为可能大多数场景都经过了测试

我正在使用SpringBoot和ReactJS为前端编写web应用程序。我现在正试图编写一个简单的脚本,显示一些从单独的文件导入到html文件的纯文本。这样做之后,我最终什么也没出现

以下是我的项目结构:

下面是我的app.js,其中定义了我的组件:

var CommentBox = React.createClass({
render: function() {
    return (
        <div className="commentBox">
            Hello, world! I am a CommentBox.
        </div>
    );
}
});
   ReactDOM.render(<CommentBox />, document.getElementById('content')
);
以下是cardists.html页面:

[问题]
我在哪里可能会犯错误,因为第一眼看到的一切对我来说都很好,但我得到的是空白页/

您在content div中呈现应用程序,如

ReactDOM.render(<CommentBox />, document.getElementById('root')
ReactDOM.render(<CommentBox />, document.getElementById('content')
ReactDOM.render(<CommentBox />, document.getElementById('root')