Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot reloading #19

Closed
Erdboden opened this issue Jun 11, 2018 · 3 comments
Closed

Hot reloading #19

Erdboden opened this issue Jun 11, 2018 · 3 comments

Comments

@Erdboden
Copy link

While hot reloading is enabled sometimes the route calls return 404. How can it be fixed? coming from php, it's really a struggle waiting all the time to recompile everything after some minor changes in the backend :(

@jonashackt
Copy link
Owner

jonashackt commented Jun 11, 2018

Hi @Erdboden - so the frontend process of hot reloading with the webpack dev server works for you and now you want to also change things inside the Spring Boot backend - and these aren´t reloaded? Inside the backend´s pom.xml the spring-boot-devtools should be in place to do the hot reloading of the backend. Depending on your IDE, this is triggering a fast restart of the backend. In IntelliJ you need to manually trigger a recompile in order to trigger this mechanism - at my Mac this is cmd - F9.

@Erdboden
Copy link
Author

Erdboden commented Jun 11, 2018

@jonashackt

now you want to also change things inside the Spring Boot backend - and these aren´t reloaded?

yes correct

Inside the backend´s pom.xml the spring-boot-devtools should be in place to do the hot reloading of the backend.

i already have that

So yes on windows I also use ctrl-f9 but sometimes REST controllers just fail after hot swap and return 404 error. after recompiling again everything works fine.
Now i understand the problem is not related to this project so sorry for offtopic

also since you're here, I am not able to get an array of objects in my rest controller passed from a vue component

vue:
var params = new URLSearchParams(); params.append('users', this.user); AXIOS.post(/user, params) .then(response => { // JSON responses are automatically parsed. })

controller method:
long addNewUser(@RequestParam("users") String[] userTranslations) { System.out.println(userTranslations);

array:
image

what am i doing wrong?

@jonashackt
Copy link
Owner

Ok, so I close the ticket now :)

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

No branches or pull requests

2 participants