| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,8 @@ | |||
| 4 | 4 | import org.springframework.boot.SpringApplication; | |
| 5 | 5 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | |
| 6 | 6 | import org.springframework.boot.autoconfigure.domain.EntityScan; | |
| 7 | + import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; | ||
| 8 | + import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; | ||
| 7 | 9 | import org.springframework.context.annotation.ComponentScan; | |
| 8 | 10 | import org.springframework.context.annotation.Configuration; | |
| 9 | 11 | ||
@@ -22,14 +24,12 @@ | |||
| 22 | 24 | * Copyright(©) 2015 by xiaomo. | |
| 23 | 25 | **/ | |
| 24 | 26 | @Configuration | |
| 25 | - @EnableAutoConfiguration | ||
| 27 | + @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class}) | ||
| 26 | 28 | @ComponentScan("info.xiaomo") | |
| 27 | 29 | @EntityScan("info.xiaomo.*.model") | |
| 28 | 30 | public class AsyncMain { | |
| 29 | 31 | public static void main(String[] args) throws Exception { | |
| 30 | 32 | SpringApplication.run(AsyncMain.class, args); | |
| 31 | 33 | } | |
| 32 | 34 | ||
| 33 | - | ||
| 34 | - | ||
| 35 | 35 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,7 @@ | |||
| 26 | 26 | **/ | |
| 27 | 27 | ||
| 28 | 28 | @RestController | |
| 29 | - @RequestMapping("/async") | ||
| 29 | + @RequestMapping("/") | ||
| 30 | 30 | public class TestController extends BaseController { | |
| 31 | 31 | ||
| 32 | 32 | private final AsyncTask task; | |
@@ -36,7 +36,7 @@ public TestController(AsyncTask task) { | |||
| 36 | 36 | this.task = task; | |
| 37 | 37 | } | |
| 38 | 38 | ||
| 39 | - @RequestMapping(value = "/task", method = RequestMethod.GET) | ||
| 39 | + @RequestMapping(value = "/", method = RequestMethod.GET) | ||
| 40 | 40 | public Result task() throws Exception { | |
| 41 | 41 | long start = System.currentTimeMillis(); | |
| 42 | 42 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments