|  |  | 
 |  |  |  | 
 |  |  |     private Integer generateMap1Bay(int bay) { | 
 |  |  |         int y = bay; | 
 |  |  |         Integer[] bayAdd = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19}; | 
 |  |  |         Integer[] bayAdd = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105}; | 
 |  |  |         for (int i = 0; i < bayAdd.length; i++) { | 
 |  |  |             if (bay > bayAdd[i]) { | 
 |  |  |                 y++; | 
 |  |  | 
 |  |  |  | 
 |  |  |     private Integer generateMap4Row(int row) { | 
 |  |  |         int x = row; | 
 |  |  |         Integer[] rowAdd = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21}; | 
 |  |  |         Integer[] rowAdd = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119}; | 
 |  |  |         for (int i = 0; i < rowAdd.length; i++) { | 
 |  |  |             if (row > rowAdd[i]) { | 
 |  |  |                 x++; | 
 |  |  | 
 |  |  |  | 
 |  |  |     private Integer generateMap2Row(int row) { | 
 |  |  |         int x = row; | 
 |  |  |         Integer[] rowAdd = {2, 4, 6, 7, 8, 10, 12, 13, 15, 17, 19, 20, 22, 24}; | 
 |  |  |         Integer[] rowAdd = {2, 4, 6, 7, 8, 10, 12, 13, 15, 17, 19, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116}; | 
 |  |  |         for (int i = 0; i < rowAdd.length; i++) { | 
 |  |  |             if (row > rowAdd[i]) { | 
 |  |  |                 x++; | 
 |  |  | 
 |  |  |  | 
 |  |  |     private Integer generateMap3Row(int row) { | 
 |  |  |         int x = row; | 
 |  |  |         Integer[] rowAdd = {2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 22, 24, 26, 28, 30, 32}; | 
 |  |  |         Integer[] rowAdd = {2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122}; | 
 |  |  |         for (int i = 0; i < rowAdd.length; i++) { | 
 |  |  |             if (row >= rowAdd[i]) { | 
 |  |  |                 x++; | 
 
 |  |  | 
 |  |  |     public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { | 
 |  |  |         //采用定长的线程池,防止定时任务异常时导致大量线程被占用; | 
 |  |  |  | 
 |  |  |         // 创建一个 ScheduledThreadPoolExecutor,核心线程数为 12,最大线程数为 24 | 
 |  |  |         ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(12, new ThreadPoolExecutor.CallerRunsPolicy()); | 
 |  |  |         // 设置最大线程数为 24 | 
 |  |  |         executor.setMaximumPoolSize(24); | 
 |  |  |         // 创建一个 ScheduledThreadPoolExecutor,核心线程数为 12,最大线程数为 50 | 
 |  |  |         ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(12, new ThreadPoolExecutor.DiscardPolicy()); | 
 |  |  |         // 设置最大线程数为 50 | 
 |  |  |         executor.setMaximumPoolSize(50); | 
 |  |  |         taskRegistrar.setScheduler(executor); | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  | spring: | 
 |  |  |   profiles: | 
 |  |  |     #dev loc prod | 
 |  |  |     active: loc | 
 |  |  |     active: prod |