SpringBoot

From Wiki RB4
Revision as of 21:08, 16 February 2021 by UweHeuer (talk | contribs) (→‎Concepts)

Concepts

  • SpringBoot Autoconfiguration
  • Dispatcher Servlet
  • Security

Configuration

\test1\src\main\resources\applircation.properties
  logging.level.org.springframework = debug

Implementation

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin(origins="http://localhost:4200") // avoid cross origin errors in browser
public class HelloWorldController 
{
  // @RequestMapping(method=RequestMethod.GET, path="/hello-world")
  @GetMapping(path="/hello-world")

Examples

  • start eclipse
  • File -> Import -> Maven Project