Skip to content

Adding source code for article tracked under BAEL-3172.#7540

Merged
pivovarit merged 6 commits into
eugenp:masterfrom
kcacademic:nashorn-react
Aug 24, 2019
Merged

Adding source code for article tracked under BAEL-3172.#7540
pivovarit merged 6 commits into
eugenp:masterfrom
kcacademic:nashorn-react

Conversation

@kcacademic

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread spring-boot-nashorn/pom.xml Outdated

<parent>
<artifactId>parent-boot-2</artifactId>
<groupId>com.baeldung</groupId>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's reindent with spaces instead of tabs.


ScriptEngine nashorn = new ScriptEngineManager().getEngineByName("nashorn");

nashorn.eval(new FileReader("./src/main/webapp/js/react.js"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these src/main paths will work once the app is packaged and deployed

var last = this.state.data[this.state.data.length-1];
var secondLast = this.state.data[this.state.data.length-2];
$.ajax({
url: 'http://localhost:8080/next/'+last+'/'+secondLast,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch the URLs in this file to relative URLs

var last = this.state.data[this.state.data.length-1];
var secondLast = this.state.data[this.state.data.length-2];
$.ajax({
url: 'http://localhost:8080/next/'+last+'/'+secondLast,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a relative URL rather than absolute hardcoded to localhost:8080?

@kcacademic

Copy link
Copy Markdown
Contributor Author

@pivovarit , This CI build seems to have been aborted, anyway, this can be retriggered?

@pivovarit pivovarit merged commit 4be26bb into eugenp:master Aug 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants