晓瑞223 | 1b42236 | 2025-06-04 01:09:31 +0800 | [diff] [blame] | 1 | // TestConfig.java |
| 2 | package edu.bjtu.groupone.backend; |
| 3 | |
| 4 | import org.springframework.context.annotation.Bean; |
| 5 | import org.springframework.context.annotation.Configuration; |
| 6 | import org.springframework.context.annotation.Profile; |
| 7 | import org.springframework.data.web.PageableHandlerMethodArgumentResolver; |
| 8 | |
| 9 | @Configuration |
| 10 | @Profile("test") |
| 11 | public class TestConfig { |
| 12 | |
| 13 | @Bean |
| 14 | public PageableHandlerMethodArgumentResolver pageableResolver() { |
| 15 | PageableHandlerMethodArgumentResolver resolver = new PageableHandlerMethodArgumentResolver(); |
| 16 | resolver.setOneIndexedParameters(true); |
| 17 | resolver.setMaxPageSize(100); |
| 18 | return resolver; |
| 19 | } |
| 20 | } |