12345678910111213141516171819202122232425262728293031 |
- package com.fdkankan.scene;
- import com.fdkankan.scene.dto.TestDto;
- import org.springframework.boot.SpringApplication;
- import org.springframework.boot.autoconfigure.SpringBootApplication;
- import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
- import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RestController;
- @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
- @RestController
- @EnableDiscoveryClient
- public class SceneApplication {
- public static void main(String[] args) {
- SpringApplication.run(SceneApplication.class, args);
- }
- @PostMapping("/test/test")
- public TestDto test(@RequestBody TestDto test){
- System.out.println("进入了");
- if(test.getName().equals("aaa")){
- // throw new BusinessException(1000,"asdfaswdfasdfsdf");
- int i = test.getId() / 0;
- }
- return test;
- }
- }
|