Skip to content

ynad123/SpringBootJPAExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

SpringBootJPAExample: REST-Backend mit Spring Boot

Einstieg in Spring Boot:

https://www.tutorialspoint.com/spring_boot/spring_boot_tomcat_deployment.htm

Einstieg in Java JPA

http://www.java2s.com/Tutorials/Java/JPA/index.htm

Vorbereitungen

Java EE installiert
Mysql installiert ( https://www.mysql.com/de/ )
MysqlWorkBench installiert und auf localhost DB angelegt

Tomcat installieren

  • Tomcat local installieren —> Verzeichnis downloaden und entpacken
  • In bin: chmod +x .sh
  • Dann ./startup

In Eclipse

spring boot Projekt angelegt entsprechend des Videos: https://www.youtube.com/watch?v=1ny8-kzmdJE

Diese Projekt ist verfügbar, wenn in Eclipse gestartet —> direkt unter localhost:8080/customer

Deployment über Tomcat

In Eclipse: in pom.xml Änderungen: war auf gleicher Ebene wie parent de.meyerdany.customerapi.CustomerapiApplication —> in properties

In CustomerapiApplication extends SpringBootServletInitializer

@Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(CustomerapiApplication.class); }

Wie in https://www.tutorialspoint.com/spring_boot/spring_boot_tomcat_deployment.htm beschrieben

———— Project clean

Nun war erzeugen: In eclipse —> auf Project klicken —> rechts —> run as —> maven install

—> in target wird nun war-File generiert

—— War file ggf. umbenennen und kopieren Von Tomcat aus deployen

Aufruf Localhost:8080/namewarfile/customer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages