zouabimourad / angular2-spring

Angular 2+ and Spring Integration
130 stars 86 forks source link

Same Server #1

Open houssemzaier opened 8 years ago

houssemzaier commented 8 years ago

Hi @zouabimourad , I am interesting in using these technologies (NG2 and Springboot), I have google that so I found your projects. I was wondering about how to use angular2 and springboot together in the same server like we use to do in angular1 (JS , CSS and HTML files are put in the static folder 'main/resources/static') So do you know how to convert typescript files to JS so we could put them in the same application server?

zouabimourad commented 8 years ago

You will have to use gulp in dev mode to translate ts to js in the fly .. And when building with maven you can use maven-front-build to bootstap the gulp workflow used in dev mode.

I'll try to make an example

houssemzaier commented 8 years ago

Thank you

rcampion commented 8 years ago

I can't find this class in the model.

import net.mzouabi.ng2.server.model.QPerson;

zouabimourad commented 8 years ago

@rcampion The QPerson class is geneated by APT ( annotaions processing tools ). APT in launched by maven-processor-plugin. IDEs like eclipse or intellij launches APT automatically so you should have this class generated in target/generated-sources/java

rcampion commented 8 years ago

Thank you for your quick response. I found it. I'm trying to piece the project together in Eclipse without Maven. Also modified the package.json to compile the TypeScript files.

Regards, Richard

On Tue, Mar 29, 2016 at 2:20 PM, Mourad ZOUABI notifications@github.com wrote:

@rcampion https://github.com/rcampion The QPerson class is geneated by APT ( annotaions processing tools ). APT in launched by maven-processor-plugin. IDEs like eclipse or intellij launches APT automatically so you should have this class generated in target/generated-sources/java

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/zouabimourad/angular2-spring/issues/1#issuecomment-203036010

Richard Campion campion.richard@gmail.com http://www.richardcampion.com http://www.linkedin.com/in/richardcampion

saiga29 commented 8 years ago

@rcampion - Can you please provide me with what you found? I am trying to do the same but i couldnt find an example.

rcampion commented 8 years ago

@saiga29 - What I found was the generated class QPerson in target/generated-sources/java by building the original project using Maven. Then I copied this class to my project in Eclipse.

KragelNikita commented 8 years ago

@zouabimourad hi! can u please say me, how u connect ng2 with spring?i try to find it in project but i can't

Dharmendra205111014 commented 7 years ago

Hi @zouabimourad,

Thanks for sharing the project. really helpful. However could you please help us to build and run on prod server ? any clue. as the startup will be frontend app, how the backend app startup is managed ?