title: Problems accessing Spring-Boot RestController from Angular frontend
body: <p>I have the following setup:</p>
  
  <p><strong>My controller:</strong></p>
  
  <pre><code>@RequestMapping("/project")
  @RestController
  public class ProjectController {
      private final Logger logger = LoggerFactory.getLogger(this.getClass());
  
      @Autowired
      ProjectService projectService;
  
      @CrossOrigin
      @PostMapping(value = "/createProject")
      public ResponseEntity createProject(@RequestBody ProjectDto projectJsonString) {
          return ResponseEntity.ok(HttpStatus.OK);
      }
  }
  </code></pre>
  
  <p><strong>In my <code>.service.ts</code>:</strong></p>
  
  <pre><code>this.http.post('http://localhost:8080/project/createProject', JSON.stringify(project)).
        subscribe( (res) =&gt; {
          this.logger.info('Response: ' + res);
        });
  </code></pre>
  
  <p><strong>My Dto:</strong></p>
  
  <pre><code>public class ProjectDto {
      private String projectName;
      private String projectNumber;
      private String projectArea;
      private String managerName;
      private String managerShorthand;
  }
  </code></pre>
  
  <p>But when I build the app to a jar-file and execute it I get the following error when the api-call is executed:</p>
  
  <pre><code>HttpErrorResponse {headers: HttpHeaders, status: 415, statusText: "OK", url: "http://localhost:8080/project/createProject", ok: false, …}
  error:
  error: "Unsupported Media Type"
  message: "Content type 'text/plain;charset=UTF-8' not supported"
  path: "/project/createProject"
  status: 415
  timestamp: "2018-12-10T21:41:26.036+0000"
  </code></pre>
  
  <p>and the same thing happens when I <code>curl</code> it. Can someone tell me what I am doing wrong?</p>