4 Replies - 303 Views - Last Post: 06 August 2018 - 09:14 AM

#1 tekblade   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 77
  • Joined: 21-December 17

spring/rest and spring mvc

Posted 05 August 2018 - 08:27 AM

Hi, I have question can it be in one maven project rest and mvc services. My commands:
mvn clean install
mvn spring-boot:run


doesnt it colide?
Is This A Good Question/Topic? 0
  • +

Replies To: spring/rest and spring mvc

#2 ndc85430   User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 972
  • View blog
  • Posts: 3,837
  • Joined: 13-June 14

Re: spring/rest and spring mvc

Posted 05 August 2018 - 09:17 AM

I'm not really sure what your question is. The first command should end up installing your application's JAR(s) in the local repository (e.g. under ~/.m2 on UNIX) and presumably the second starts your Spring Boot application. So, I'm not sure what kind of collision you're worried about.
Was This Post Helpful? 0
  • +
  • -

#3 tekblade   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 77
  • Joined: 21-December 17

Re: spring/rest and spring mvc

Posted 05 August 2018 - 10:20 AM

I am using two separate classes one uses
@Controller


and the secound one:
@RestController


This post has been edited by tekblade: 05 August 2018 - 10:21 AM

Was This Post Helpful? 0
  • +
  • -

#4 ndc85430   User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 972
  • View blog
  • Posts: 3,837
  • Joined: 13-June 14

Re: spring/rest and spring mvc

Posted 05 August 2018 - 10:33 AM

Oh, your question is more about Spring than Maven. Are you seeing any problems using those annotations separately? I don't use Spring, but I'm still not sure why you think there'd be a problem if you use different annotations on different, unrelated classes. Perhaps consult the documentation.
Was This Post Helpful? 0
  • +
  • -

#5 tekblade   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 77
  • Joined: 21-December 17

Re: spring/rest and spring mvc

Posted 06 August 2018 - 09:14 AM

I have another question.
the data types examplse string or int declaration matters for Json RestTemplate client?
ex.:
public class Buyer {
	String email;
	String phone;
	String firstName;
	String lastName;
	String language;
}



Or it is automically converted to json and it doesnt matter if it is integer orstring for example phone.?
Regards
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1