tag:blogger.com,1999:blog-1232373056233364796.post7791773685838373370..comments2019-03-20T04:49:16.221-07:00Comments on Brians Java Blog: Spring Boot REST TutorialBrianhttp://www.blogger.com/profile/10580394485657179244noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-1232373056233364796.post-72208223815280644192017-02-14T06:12:20.018-08:002017-02-14T06:12:20.018-08:00On Windows to make Post and Put to work via curl f...On Windows to make Post and Put to work via curl for me it has been necessary to escape space and double quotes<br />curl -i -H &quot;Content-Type: application/json&quot; -X PUT -d {\&quot;id\&quot;:3,\&quot;firstName\&quot;:\&quot;Joe\&quot;,\&quot;lastName\&quot;:\&quot;Smith333333\&quot;,\&quot;dateOfBirth\&quot;:379468800000,\&quot;address\&quot;:{\&quot;id\&quot;:3,\&quot;street\&quot;:\&quot;&quot;High Street&quot;\&quot;,\&quot;town\&quot;:\&quot;Belfast\&quot;,\&quot;county\&quot;:\&quot;Down\&quot;,\&quot;postcode\&quot;:\&quot;BT893PY\&quot;}} localhost:8080/rest/customers/3 Unknownhttps://www.blogger.com/profile/13283181305120889846noreply@blogger.comtag:blogger.com,1999:blog-1232373056233364796.post-58072331120268499722016-04-05T10:14:43.887-07:002016-04-05T10:14:43.887-07:00Created a tutorial on Spring boot. Check it out he...Created a tutorial on Spring boot. Check it out here.<br /><br />http://www.adeveloperdiary.com/java/spring-boot/an-introduction-to-spring-boot/Abhisek Janahttps://www.blogger.com/profile/03463767375919029328noreply@blogger.comtag:blogger.com,1999:blog-1232373056233364796.post-46416547056634775502016-02-17T11:22:14.040-08:002016-02-17T11:22:14.040-08:00Why do you make your own controller(s) when SDR ha...Why do you make your own controller(s) when SDR handles that for you?Neil McGuiganhttps://www.blogger.com/profile/14122981831780837323noreply@blogger.comtag:blogger.com,1999:blog-1232373056233364796.post-3275436077626801992016-02-16T00:14:56.800-08:002016-02-16T00:14:56.800-08:00Yes, changes have been pushed to https://github.co...Yes, changes have been pushed to https://github.com/briansjavablog/spring-boot-rest-tutorial.Brianhttps://www.blogger.com/profile/10580394485657179244noreply@blogger.comtag:blogger.com,1999:blog-1232373056233364796.post-13773296031341583032016-02-16T00:12:12.608-08:002016-02-16T00:12:12.608-08:00Did you update the github prject too?
OK. I will t...Did you update the github prject too?<br />OK. I will try it later.<br />Thanks.Hendi Santika's Bloghttps://www.blogger.com/profile/15633721674958788382noreply@blogger.comtag:blogger.com,1999:blog-1232373056233364796.post-26542132698418331872016-02-15T23:56:36.610-08:002016-02-15T23:56:36.610-08:00I&#39;ve made a few updates to the code to align w...I&#39;ve made a few updates to the code to align with Spring Boot best practice.<br />Application.java has been moved to a root package. I also got rid of a few unnecessary annotations on Application.java - @EnableJpaRepository, @EntityScan and @ComponentScan. These are not required as @SpringBootApplication is a wrapper for @Configuration, @EnableCOnfiguration and @ComponentScan, so will take care of these automatically. The final tweak was the removal of the @Repository annotation from CustomerRepository. Spring will automatically detect this class as a repository because it extends CrudRepository. These updates have been pushed to github.Brianhttps://www.blogger.com/profile/10580394485657179244noreply@blogger.comtag:blogger.com,1999:blog-1232373056233364796.post-22654957728020617312015-12-07T00:40:44.175-08:002015-12-07T00:40:44.175-08:00I&#39;d need to see CustomerApplicationTests.javaI&#39;d need to see CustomerApplicationTests.javaBrianhttps://www.blogger.com/profile/10580394485657179244noreply@blogger.comtag:blogger.com,1999:blog-1232373056233364796.post-73129302274472220632015-12-07T00:03:32.066-08:002015-12-07T00:03:32.066-08:00What should I post?
CustomerApplicationTests.java?...What should I post?<br />CustomerApplicationTests.java?<br />==========================<br /># JPA Config<br />spring.jpa.show-sql=true<br />spring.jpa.database-platform=org.hibernate.dialect.HSQLDialect<br />server.port: 9000<br />management.port: 9001<br />management.address: 127.0.0.1<br />#spring.datasource.url=jdbc:mysql://localhost:3306/optimus<br />#spring.datasource.username=root<br />#spring.datasource.password=<br /><br />spring.jpa.generate-ddl=true<br />spring.jpa.show-sql=true<br />spring.jpa.properties.hibernate.format_sql=true<br />spring.jackson.serialization.indent_output=true<br />spring.thymeleaf.cache=false<br />#grant all on optimus.* to root@localhost identified by &#39;&#39;;<br />==========================<br />That was my application.propertiesHendi Santika's Bloghttps://www.blogger.com/profile/15633721674958788382noreply@blogger.comtag:blogger.com,1999:blog-1232373056233364796.post-73177008927781037042015-12-06T23:31:43.934-08:002015-12-06T23:31:43.934-08:00Hey,
The top of the stracktrace you sent me via em...Hey,<br />The top of the stracktrace you sent me via email was...<br /><br />org.springframework.beans.factory.BeanCreationException: Error creating bean with name &#39;customerApplicationTests&#39;: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private int com.santika.hendi.jms.CustomerApplicationTests.port; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder &#39;local.server.port&#39; in string value &quot;${local.server.port}&quot;<br /> at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]<br /> at ...........<br /><br />The key piece of information here is...<br /><br /><b>Could not resolve placeholder &#39;local.server.port&#39; in string value &quot;${local.server.port}&quot;,</b><br /><br />Looks like you&#39;re trying to inject it into a class called CustomerApplicationTests. Can you post a stripped down version of this class so I can see how it&#39;s configured? I assume you&#39;ve applied the same annotation configuration I&#39;ve applied to CustomerControllerIT in the sample code?Brianhttps://www.blogger.com/profile/10580394485657179244noreply@blogger.comtag:blogger.com,1999:blog-1232373056233364796.post-49577552508472884802015-12-06T04:17:03.105-08:002015-12-06T04:17:03.105-08:00I could not sent the stack trace. Coz It was too l...I could not sent the stack trace. Coz It was too long to paste it here.<br /><br />Could you mind check my Code?<br />ThanksHendi Santika's Bloghttps://www.blogger.com/profile/15633721674958788382noreply@blogger.comtag:blogger.com,1999:blog-1232373056233364796.post-8952118177820881752015-12-06T03:50:05.967-08:002015-12-06T03:50:05.967-08:00Hi Brian, I have red your tutorial.
That was nice ...Hi Brian, I have red your tutorial.<br />That was nice share.<br /><br />But, when I try to run your project it says that : <br />java.lang.IllegalStateException: Failed to load ApplicationContext<br /><br />Could you give me an advise?<br />Thanks before.Hendi Santika's Bloghttps://www.blogger.com/profile/15633721674958788382noreply@blogger.com