techsavvy
techsavvy

Reputation: 39

spring boot angularjs spring data jpa crud-app example get 404 error in eclipse

http://websystique.com/spring-boot/spring-boot-angularjs-spring-data-jpa-crud-app-example/ I have imported this project from tutorial, it runs perfectly without any error. But for view it used index.ftl, it shows 404 error in eclipse.

my application.yml file

---
server:
  port: 8080
  contextPath: /SpringBootCRUDApp
---
spring:
  profiles: local, default
datasource:
  sampleapp:
    url: jdbc:h2:~/emp
    username: sa
    password: 
    driverClassName: org.h2.Driver
    defaultSchema:
    maxPoolSize: 10
    hibernate:
      hbm2ddl.method: create-drop
      show_sql: true
      format_sql: true
      dialect: org.hibernate.dialect.H2Dialect
---
spring:
  profiles: prod
datasource:
  sampleapp:
    url: jdbc:mysql://localhost:3306/emp
    username: root
    password: root
    driverClassName: com.mysql.jdbc.Driver
    defaultSchema:
    maxPoolSize: 20
    hibernate:
      hbm2ddl.method: update
      show_sql: true
      format_sql: true
      dialect: org.hibernate.dialect.MySQLDialect

Upvotes: 0

Views: 486

Answers (2)

Shafs Jan
Shafs Jan

Reputation: 426

This application is a spring boot application which is like a stand alone application(it use internal tomcat), no external tomcat is required. You have to start it using maven or directly from the application class.

  1. Stop any servers if you are already running.
  2. In the project goto the class SpringBootCRUDApp -> rightClick -> Run as Spring Boot Application. Now, you should see the application is getting started.

Once its started, goto the browser and give this URL http://localhost:8080/SpringBootCRUDApp. You should see the screen shown above.

Upvotes: 1

Shafs Jan
Shafs Jan

Reputation: 426

Believe that your application has started successfully.

You should use http://localhost:8080/SpringBootCRUDApp ..

enter image description here

Upvotes: 0

Related Questions