Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

APIs

Haim Gilboa
Haim Gilboa
145 Points

Repository and Id not mapped as in Demo.

I followed your demo (using maven instead of gradle and STS instead of IntelliJ) and when running Application I got the following in the console:

2017-11-09 13:30:51.749 INFO 8560 --- [ main] com.treehouse.Application : Starting Application on HAIMGI02 with PID 8560 (C:\DigitalOC\workspaces\Spring-Rest-proj\course-reviews-api\target\classes started by HAIMGI in C:\DigitalOC\workspaces\Spring-Rest-proj\course-reviews-api) 2017-11-09 13:30:51.755 INFO 8560 --- [ main] com.treehouse.Application : No active profile set, falling back to default profiles: default 2017-11-09 13:30:51.907 INFO 8560 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@23bb8443: startup date [Thu Nov 09 13:30:51 IST 2017]; root of context hierarchy 2017-11-09 13:30:57.309 INFO 8560 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http) 2017-11-09 13:30:57.382 INFO 8560 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2017-11-09 13:30:57.384 INFO 8560 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.23 2017-11-09 13:30:57.819 INFO 8560 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2017-11-09 13:30:57.820 INFO 8560 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 5922 ms 2017-11-09 13:30:58.210 INFO 8560 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/] 2017-11-09 13:30:58.217 INFO 8560 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/] 2017-11-09 13:30:58.218 INFO 8560 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/] 2017-11-09 13:30:58.218 INFO 8560 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/] 2017-11-09 13:30:58.219 INFO 8560 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/] 2017-11-09 13:30:59.753 INFO 8560 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default' 2017-11-09 13:30:59.795 INFO 8560 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [ name: default ...] 2017-11-09 13:31:00.016 INFO 8560 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.0.12.Final} 2017-11-09 13:31:00.019 INFO 8560 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found 2017-11-09 13:31:00.022 INFO 8560 --- [ main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist 2017-11-09 13:31:00.119 INFO 8560 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final} 2017-11-09 13:31:00.423 INFO 8560 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect 2017-11-09 13:31:01.590 INFO 8560 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000227: Running hbm2ddl schema export 2017-11-09 13:31:01.613 INFO 8560 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000230: Schema export complete 2017-11-09 13:31:01.708 INFO 8560 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2017-11-09 13:31:03.438 INFO 8560 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@23bb8443: startup date [Thu Nov 09 13:30:51 IST 2017]; root of context hierarchy 2017-11-09 13:31:03.682 INFO 8560 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 2017-11-09 13:31:03.686 INFO 8560 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 2017-11-09 13:31:03.829 INFO 8560 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2017-11-09 13:31:03.840 INFO 8560 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2017-11-09 13:31:04.022 INFO 8560 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2017-11-09 13:31:04.877 INFO 8560 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2017-11-09 13:31:05.200 INFO 8560 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http) 2017-11-09 13:31:05.208 INFO 8560 --- [ main] com.treehouse.Application : Started Application in 14.228 seconds (JVM running for 15.231)

This is my pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>

<groupId>com.treehouse</groupId> <artifactId>course-reviews-api</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging>

<name>course-reviews-api</name> <url>http://maven.apache.org</url>

<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties>

<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>1.3.3.RELEASE</version> </plugin> </plugins> </build>

<dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> <version>1.3.3.RELEASE</version> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>1.4.196</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version>1.3.3.RELEASE</version> </dependency> </dependencies> </project>

I would like to get some advise :)