• 解决springboot 新版本 2.1.6 spring-boot-starter-actuator 访问报404


    pom.xml

    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    4. <modelVersion>4.0.0</modelVersion>
    5. <artifactId>demoservice</artifactId>
    6. <name>demoservice</name>
    7. <!-- FIXME change it to the project's website -->
    8. <url>http://www.example.com</url>
    9. <parent>
    10. <groupId>org.springframework.boot</groupId>
    11. <artifactId>spring-boot-starter-parent</artifactId>
    12. <version>2.1.6.RELEASE</version>
    13. <relativePath/> <!-- lookup parent from repository -->
    14. </parent>
    15. <properties>
    16. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    17. <maven.compiler.source>1.8</maven.compiler.source>
    18. <maven.compiler.target>1.8</maven.compiler.target>
    19. <spring-cloud.version>Greenwich.SR2</spring-cloud.version>
    20. </properties>
    21. <dependencyManagement>
    22. <dependencies>
    23. <dependency>
    24. <groupId>org.springframework.cloud</groupId>
    25. <artifactId>spring-cloud-dependencies</artifactId>
    26. <version>${spring-cloud.version}</version>
    27. <type>pom</type>
    28. <scope>import</scope>
    29. </dependency>
    30. </dependencies>
    31. </dependencyManagement>
    32. <dependencies>
    33. <dependency>
    34. <groupId>org.springframework.boot</groupId>
    35. <artifactId>spring-boot-starter-web</artifactId>
    36. </dependency>
    37. <dependency>
    38. <groupId>org.springframework.boot</groupId>
    39. <artifactId>spring-boot-starter-actuator</artifactId>
    40. </dependency>
    41. <dependency>
    42. <groupId>org.springframework.boot</groupId>
    43. <artifactId>spring-boot-starter-test</artifactId>
    44. <scope>test</scope>
    45. </dependency>
    46. </dependencies>
    47. <build>
    48. <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
    49. <plugins>
    50. <plugin>
    51. <groupId>org.springframework.boot</groupId>
    52. <artifactId>spring-boot-maven-plugin</artifactId>
    53. </plugin>
    54. </plugins>
    55. </pluginManagement>
    56. </build>
    57. </project>

    application.yml

    1. server:
    2. # 适用于本地调试,防止端口冲突
    3. port: ${random.int[8000,9000]}
    4. # springboot 2.1.6 引入actuator需要声明导出的接口,否则不会像早期版本那样自动映射出去
    5. management:
    6. endpoints:
    7. web:
    8. exposure:
    9. include: "*"

    启动服务,输出日志:

    1. . ____ _ __ _ _
    2. /\ / ___'_ __ _ _(_)_ __ __ _
    3. ( ( )\___ | '_ | '_| | '_ / _` |
    4. \/ ___)| |_)| | | | | || (_| | ) ) ) )
    5. ' |____| .__|_| |_|_| |_\__, | / / / /
    6. =========|_|==============|___/=/_/_/_/
    7. :: Spring Boot :: (v2.1.6.RELEASE)
    8. 2019-08-20 16:55:15.502 INFO 2320 --- [ main] com.hknaruto.DemoServiceApp : Starting DemoServiceApp on localhost.localdomain with PID 2320 (/home/yeqiang/IdeaProjects/springclouddemo/demoservice/target/classes started by yeqiang in /home/yeqiang/IdeaProjects/springclouddemo)
    9. 2019-08-20 16:55:15.514 INFO 2320 --- [ main] com.hknaruto.DemoServiceApp : No active profile set, falling back to default profiles: default
    10. 2019-08-20 16:55:16.825 INFO 2320 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8073 (http)
    11. 2019-08-20 16:55:16.849 INFO 2320 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
    12. 2019-08-20 16:55:16.849 INFO 2320 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.21]
    13. 2019-08-20 16:55:16.929 INFO 2320 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
    14. 2019-08-20 16:55:16.929 INFO 2320 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1332 ms
    15. 2019-08-20 16:55:17.400 INFO 2320 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
    16. 2019-08-20 16:55:17.616 INFO 2320 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 15 endpoint(s) beneath base path '/actuator'
    17. 2019-08-20 16:55:17.684 INFO 2320 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8073 (http) with context path ''
    18. 2019-08-20 16:55:17.686 INFO 2320 --- [ main] com.hknaruto.DemoServiceApp : Started DemoServiceApp in 2.63 seconds (JVM running for 3.01)
    19. 2019-08-20 16:55:30.432 INFO 2320 --- [nio-8073-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
    20. 2019-08-20 16:55:30.432 INFO 2320 --- [nio-8073-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
    21. 2019-08-20 16:55:30.439 INFO 2320 --- [nio-8073-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 7 ms

    访问:http://127.0.0.1:8073/actuator 得到:

    1. {
    2. "_links": {
    3. "self": {
    4. "href": "http://127.0.0.1:8073/actuator",
    5. "templated": false
    6. },
    7. "auditevents": {
    8. "href": "http://127.0.0.1:8073/actuator/auditevents",
    9. "templated": false
    10. },
    11. "beans": {
    12. "href": "http://127.0.0.1:8073/actuator/beans",
    13. "templated": false
    14. },
    15. "caches-cache": {
    16. "href": "http://127.0.0.1:8073/actuator/caches/{cache}",
    17. "templated": true
    18. },
    19. "caches": {
    20. "href": "http://127.0.0.1:8073/actuator/caches",
    21. "templated": false
    22. },
    23. "health-component": {
    24. "href": "http://127.0.0.1:8073/actuator/health/{component}",
    25. "templated": true
    26. },
    27. "health": {
    28. "href": "http://127.0.0.1:8073/actuator/health",
    29. "templated": false
    30. },
    31. "health-component-instance": {
    32. "href": "http://127.0.0.1:8073/actuator/health/{component}/{instance}",
    33. "templated": true
    34. },
    35. "conditions": {
    36. "href": "http://127.0.0.1:8073/actuator/conditions",
    37. "templated": false
    38. },
    39. "configprops": {
    40. "href": "http://127.0.0.1:8073/actuator/configprops",
    41. "templated": false
    42. },
    43. "env-toMatch": {
    44. "href": "http://127.0.0.1:8073/actuator/env/{toMatch}",
    45. "templated": true
    46. },
    47. "env": {
    48. "href": "http://127.0.0.1:8073/actuator/env",
    49. "templated": false
    50. },
    51. "info": {
    52. "href": "http://127.0.0.1:8073/actuator/info",
    53. "templated": false
    54. },
    55. "loggers": {
    56. "href": "http://127.0.0.1:8073/actuator/loggers",
    57. "templated": false
    58. },
    59. "loggers-name": {
    60. "href": "http://127.0.0.1:8073/actuator/loggers/{name}",
    61. "templated": true
    62. },
    63. "heapdump": {
    64. "href": "http://127.0.0.1:8073/actuator/heapdump",
    65. "templated": false
    66. },
    67. "threaddump": {
    68. "href": "http://127.0.0.1:8073/actuator/threaddump",
    69. "templated": false
    70. },
    71. "metrics": {
    72. "href": "http://127.0.0.1:8073/actuator/metrics",
    73. "templated": false
    74. },
    75. "metrics-requiredMetricName": {
    76. "href": "http://127.0.0.1:8073/actuator/metrics/{requiredMetricName}",
    77. "templated": true
    78. },
    79. "scheduledtasks": {
    80. "href": "http://127.0.0.1:8073/actuator/scheduledtasks",
    81. "templated": false
    82. },
    83. "httptrace": {
    84. "href": "http://127.0.0.1:8073/actuator/httptrace",
    85. "templated": false
    86. },
    87. "mappings": {
    88. "href": "http://127.0.0.1:8073/actuator/mappings",
    89. "templated": false
    90. }
    91. }
    92. }

    说明:

    1. 响应内容经过手动json格式化

    2. json内容显示了所有支持的导出方法,与老版本有一定差异

    访问mapping接口,http://127.0.0.1:8073/actuator/mappings 响应如下:

    1. {
    2. "contexts": {
    3. "application": {
    4. "mappings": {
    5. "dispatcherServlets": {
    6. "dispatcherServlet": [{
    7. "handler": "ResourceHttpRequestHandler [class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/], ServletContext resource [/], class path resource []]",
    8. "predicate": "/**/favicon.ico",
    9. "details": null
    10. }, {
    11. "handler": "Actuator web endpoint 'auditevents'",
    12. "predicate": "{GET /actuator/auditevents, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    13. "details": {
    14. "handlerMethod": {
    15. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    16. "name": "handle",
    17. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    18. },
    19. "requestMappingConditions": {
    20. "consumes": [],
    21. "headers": [],
    22. "methods": ["GET"],
    23. "params": [],
    24. "patterns": ["/actuator/auditevents"],
    25. "produces": [{
    26. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    27. "negated": false
    28. }, {
    29. "mediaType": "application/json",
    30. "negated": false
    31. }]
    32. }
    33. }
    34. }, {
    35. "handler": "Actuator web endpoint 'beans'",
    36. "predicate": "{GET /actuator/beans, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    37. "details": {
    38. "handlerMethod": {
    39. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    40. "name": "handle",
    41. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    42. },
    43. "requestMappingConditions": {
    44. "consumes": [],
    45. "headers": [],
    46. "methods": ["GET"],
    47. "params": [],
    48. "patterns": ["/actuator/beans"],
    49. "produces": [{
    50. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    51. "negated": false
    52. }, {
    53. "mediaType": "application/json",
    54. "negated": false
    55. }]
    56. }
    57. }
    58. }, {
    59. "handler": "Actuator web endpoint 'caches-cache'",
    60. "predicate": "{DELETE /actuator/caches/{cache}, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    61. "details": {
    62. "handlerMethod": {
    63. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    64. "name": "handle",
    65. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    66. },
    67. "requestMappingConditions": {
    68. "consumes": [],
    69. "headers": [],
    70. "methods": ["DELETE"],
    71. "params": [],
    72. "patterns": ["/actuator/caches/{cache}"],
    73. "produces": [{
    74. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    75. "negated": false
    76. }, {
    77. "mediaType": "application/json",
    78. "negated": false
    79. }]
    80. }
    81. }
    82. }, {
    83. "handler": "Actuator web endpoint 'caches'",
    84. "predicate": "{GET /actuator/caches, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    85. "details": {
    86. "handlerMethod": {
    87. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    88. "name": "handle",
    89. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    90. },
    91. "requestMappingConditions": {
    92. "consumes": [],
    93. "headers": [],
    94. "methods": ["GET"],
    95. "params": [],
    96. "patterns": ["/actuator/caches"],
    97. "produces": [{
    98. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    99. "negated": false
    100. }, {
    101. "mediaType": "application/json",
    102. "negated": false
    103. }]
    104. }
    105. }
    106. }, {
    107. "handler": "Actuator web endpoint 'caches'",
    108. "predicate": "{DELETE /actuator/caches}",
    109. "details": {
    110. "handlerMethod": {
    111. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    112. "name": "handle",
    113. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    114. },
    115. "requestMappingConditions": {
    116. "consumes": [],
    117. "headers": [],
    118. "methods": ["DELETE"],
    119. "params": [],
    120. "patterns": ["/actuator/caches"],
    121. "produces": []
    122. }
    123. }
    124. }, {
    125. "handler": "Actuator web endpoint 'caches-cache'",
    126. "predicate": "{GET /actuator/caches/{cache}, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    127. "details": {
    128. "handlerMethod": {
    129. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    130. "name": "handle",
    131. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    132. },
    133. "requestMappingConditions": {
    134. "consumes": [],
    135. "headers": [],
    136. "methods": ["GET"],
    137. "params": [],
    138. "patterns": ["/actuator/caches/{cache}"],
    139. "produces": [{
    140. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    141. "negated": false
    142. }, {
    143. "mediaType": "application/json",
    144. "negated": false
    145. }]
    146. }
    147. }
    148. }, {
    149. "handler": "Actuator web endpoint 'health-component'",
    150. "predicate": "{GET /actuator/health/{component}, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    151. "details": {
    152. "handlerMethod": {
    153. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    154. "name": "handle",
    155. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    156. },
    157. "requestMappingConditions": {
    158. "consumes": [],
    159. "headers": [],
    160. "methods": ["GET"],
    161. "params": [],
    162. "patterns": ["/actuator/health/{component}"],
    163. "produces": [{
    164. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    165. "negated": false
    166. }, {
    167. "mediaType": "application/json",
    168. "negated": false
    169. }]
    170. }
    171. }
    172. }, {
    173. "handler": "Actuator web endpoint 'health'",
    174. "predicate": "{GET /actuator/health, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    175. "details": {
    176. "handlerMethod": {
    177. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    178. "name": "handle",
    179. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    180. },
    181. "requestMappingConditions": {
    182. "consumes": [],
    183. "headers": [],
    184. "methods": ["GET"],
    185. "params": [],
    186. "patterns": ["/actuator/health"],
    187. "produces": [{
    188. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    189. "negated": false
    190. }, {
    191. "mediaType": "application/json",
    192. "negated": false
    193. }]
    194. }
    195. }
    196. }, {
    197. "handler": "Actuator web endpoint 'health-component-instance'",
    198. "predicate": "{GET /actuator/health/{component}/{instance}, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    199. "details": {
    200. "handlerMethod": {
    201. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    202. "name": "handle",
    203. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    204. },
    205. "requestMappingConditions": {
    206. "consumes": [],
    207. "headers": [],
    208. "methods": ["GET"],
    209. "params": [],
    210. "patterns": ["/actuator/health/{component}/{instance}"],
    211. "produces": [{
    212. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    213. "negated": false
    214. }, {
    215. "mediaType": "application/json",
    216. "negated": false
    217. }]
    218. }
    219. }
    220. }, {
    221. "handler": "Actuator web endpoint 'conditions'",
    222. "predicate": "{GET /actuator/conditions, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    223. "details": {
    224. "handlerMethod": {
    225. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    226. "name": "handle",
    227. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    228. },
    229. "requestMappingConditions": {
    230. "consumes": [],
    231. "headers": [],
    232. "methods": ["GET"],
    233. "params": [],
    234. "patterns": ["/actuator/conditions"],
    235. "produces": [{
    236. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    237. "negated": false
    238. }, {
    239. "mediaType": "application/json",
    240. "negated": false
    241. }]
    242. }
    243. }
    244. }, {
    245. "handler": "Actuator web endpoint 'configprops'",
    246. "predicate": "{GET /actuator/configprops, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    247. "details": {
    248. "handlerMethod": {
    249. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    250. "name": "handle",
    251. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    252. },
    253. "requestMappingConditions": {
    254. "consumes": [],
    255. "headers": [],
    256. "methods": ["GET"],
    257. "params": [],
    258. "patterns": ["/actuator/configprops"],
    259. "produces": [{
    260. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    261. "negated": false
    262. }, {
    263. "mediaType": "application/json",
    264. "negated": false
    265. }]
    266. }
    267. }
    268. }, {
    269. "handler": "Actuator web endpoint 'env-toMatch'",
    270. "predicate": "{GET /actuator/env/{toMatch}, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    271. "details": {
    272. "handlerMethod": {
    273. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    274. "name": "handle",
    275. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    276. },
    277. "requestMappingConditions": {
    278. "consumes": [],
    279. "headers": [],
    280. "methods": ["GET"],
    281. "params": [],
    282. "patterns": ["/actuator/env/{toMatch}"],
    283. "produces": [{
    284. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    285. "negated": false
    286. }, {
    287. "mediaType": "application/json",
    288. "negated": false
    289. }]
    290. }
    291. }
    292. }, {
    293. "handler": "Actuator web endpoint 'env'",
    294. "predicate": "{GET /actuator/env, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    295. "details": {
    296. "handlerMethod": {
    297. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    298. "name": "handle",
    299. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    300. },
    301. "requestMappingConditions": {
    302. "consumes": [],
    303. "headers": [],
    304. "methods": ["GET"],
    305. "params": [],
    306. "patterns": ["/actuator/env"],
    307. "produces": [{
    308. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    309. "negated": false
    310. }, {
    311. "mediaType": "application/json",
    312. "negated": false
    313. }]
    314. }
    315. }
    316. }, {
    317. "handler": "Actuator web endpoint 'info'",
    318. "predicate": "{GET /actuator/info, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    319. "details": {
    320. "handlerMethod": {
    321. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    322. "name": "handle",
    323. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    324. },
    325. "requestMappingConditions": {
    326. "consumes": [],
    327. "headers": [],
    328. "methods": ["GET"],
    329. "params": [],
    330. "patterns": ["/actuator/info"],
    331. "produces": [{
    332. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    333. "negated": false
    334. }, {
    335. "mediaType": "application/json",
    336. "negated": false
    337. }]
    338. }
    339. }
    340. }, {
    341. "handler": "Actuator web endpoint 'loggers'",
    342. "predicate": "{GET /actuator/loggers, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    343. "details": {
    344. "handlerMethod": {
    345. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    346. "name": "handle",
    347. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    348. },
    349. "requestMappingConditions": {
    350. "consumes": [],
    351. "headers": [],
    352. "methods": ["GET"],
    353. "params": [],
    354. "patterns": ["/actuator/loggers"],
    355. "produces": [{
    356. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    357. "negated": false
    358. }, {
    359. "mediaType": "application/json",
    360. "negated": false
    361. }]
    362. }
    363. }
    364. }, {
    365. "handler": "Actuator web endpoint 'loggers-name'",
    366. "predicate": "{GET /actuator/loggers/{name}, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    367. "details": {
    368. "handlerMethod": {
    369. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    370. "name": "handle",
    371. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    372. },
    373. "requestMappingConditions": {
    374. "consumes": [],
    375. "headers": [],
    376. "methods": ["GET"],
    377. "params": [],
    378. "patterns": ["/actuator/loggers/{name}"],
    379. "produces": [{
    380. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    381. "negated": false
    382. }, {
    383. "mediaType": "application/json",
    384. "negated": false
    385. }]
    386. }
    387. }
    388. }, {
    389. "handler": "Actuator web endpoint 'loggers-name'",
    390. "predicate": "{POST /actuator/loggers/{name}, consumes [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    391. "details": {
    392. "handlerMethod": {
    393. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    394. "name": "handle",
    395. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    396. },
    397. "requestMappingConditions": {
    398. "consumes": [{
    399. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    400. "negated": false
    401. }, {
    402. "mediaType": "application/json",
    403. "negated": false
    404. }],
    405. "headers": [],
    406. "methods": ["POST"],
    407. "params": [],
    408. "patterns": ["/actuator/loggers/{name}"],
    409. "produces": []
    410. }
    411. }
    412. }, {
    413. "handler": "Actuator web endpoint 'heapdump'",
    414. "predicate": "{GET /actuator/heapdump, produces [application/octet-stream]}",
    415. "details": {
    416. "handlerMethod": {
    417. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    418. "name": "handle",
    419. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    420. },
    421. "requestMappingConditions": {
    422. "consumes": [],
    423. "headers": [],
    424. "methods": ["GET"],
    425. "params": [],
    426. "patterns": ["/actuator/heapdump"],
    427. "produces": [{
    428. "mediaType": "application/octet-stream",
    429. "negated": false
    430. }]
    431. }
    432. }
    433. }, {
    434. "handler": "Actuator web endpoint 'threaddump'",
    435. "predicate": "{GET /actuator/threaddump, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    436. "details": {
    437. "handlerMethod": {
    438. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    439. "name": "handle",
    440. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    441. },
    442. "requestMappingConditions": {
    443. "consumes": [],
    444. "headers": [],
    445. "methods": ["GET"],
    446. "params": [],
    447. "patterns": ["/actuator/threaddump"],
    448. "produces": [{
    449. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    450. "negated": false
    451. }, {
    452. "mediaType": "application/json",
    453. "negated": false
    454. }]
    455. }
    456. }
    457. }, {
    458. "handler": "Actuator web endpoint 'metrics'",
    459. "predicate": "{GET /actuator/metrics, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    460. "details": {
    461. "handlerMethod": {
    462. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    463. "name": "handle",
    464. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    465. },
    466. "requestMappingConditions": {
    467. "consumes": [],
    468. "headers": [],
    469. "methods": ["GET"],
    470. "params": [],
    471. "patterns": ["/actuator/metrics"],
    472. "produces": [{
    473. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    474. "negated": false
    475. }, {
    476. "mediaType": "application/json",
    477. "negated": false
    478. }]
    479. }
    480. }
    481. }, {
    482. "handler": "Actuator web endpoint 'metrics-requiredMetricName'",
    483. "predicate": "{GET /actuator/metrics/{requiredMetricName}, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    484. "details": {
    485. "handlerMethod": {
    486. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    487. "name": "handle",
    488. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    489. },
    490. "requestMappingConditions": {
    491. "consumes": [],
    492. "headers": [],
    493. "methods": ["GET"],
    494. "params": [],
    495. "patterns": ["/actuator/metrics/{requiredMetricName}"],
    496. "produces": [{
    497. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    498. "negated": false
    499. }, {
    500. "mediaType": "application/json",
    501. "negated": false
    502. }]
    503. }
    504. }
    505. }, {
    506. "handler": "Actuator web endpoint 'scheduledtasks'",
    507. "predicate": "{GET /actuator/scheduledtasks, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    508. "details": {
    509. "handlerMethod": {
    510. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    511. "name": "handle",
    512. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    513. },
    514. "requestMappingConditions": {
    515. "consumes": [],
    516. "headers": [],
    517. "methods": ["GET"],
    518. "params": [],
    519. "patterns": ["/actuator/scheduledtasks"],
    520. "produces": [{
    521. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    522. "negated": false
    523. }, {
    524. "mediaType": "application/json",
    525. "negated": false
    526. }]
    527. }
    528. }
    529. }, {
    530. "handler": "Actuator web endpoint 'httptrace'",
    531. "predicate": "{GET /actuator/httptrace, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    532. "details": {
    533. "handlerMethod": {
    534. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    535. "name": "handle",
    536. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    537. },
    538. "requestMappingConditions": {
    539. "consumes": [],
    540. "headers": [],
    541. "methods": ["GET"],
    542. "params": [],
    543. "patterns": ["/actuator/httptrace"],
    544. "produces": [{
    545. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    546. "negated": false
    547. }, {
    548. "mediaType": "application/json",
    549. "negated": false
    550. }]
    551. }
    552. }
    553. }, {
    554. "handler": "Actuator web endpoint 'mappings'",
    555. "predicate": "{GET /actuator/mappings, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    556. "details": {
    557. "handlerMethod": {
    558. "className": "org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.OperationHandler",
    559. "name": "handle",
    560. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
    561. },
    562. "requestMappingConditions": {
    563. "consumes": [],
    564. "headers": [],
    565. "methods": ["GET"],
    566. "params": [],
    567. "patterns": ["/actuator/mappings"],
    568. "produces": [{
    569. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    570. "negated": false
    571. }, {
    572. "mediaType": "application/json",
    573. "negated": false
    574. }]
    575. }
    576. }
    577. }, {
    578. "handler": "Actuator root web endpoint",
    579. "predicate": "{GET /actuator, produces [application/vnd.spring-boot.actuator.v2+json || application/json]}",
    580. "details": {
    581. "handlerMethod": {
    582. "className": "org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.WebMvcLinksHandler",
    583. "name": "links",
    584. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Ljava/lang/Object;"
    585. },
    586. "requestMappingConditions": {
    587. "consumes": [],
    588. "headers": [],
    589. "methods": ["GET"],
    590. "params": [],
    591. "patterns": ["/actuator"],
    592. "produces": [{
    593. "mediaType": "application/vnd.spring-boot.actuator.v2+json",
    594. "negated": false
    595. }, {
    596. "mediaType": "application/json",
    597. "negated": false
    598. }]
    599. }
    600. }
    601. }, {
    602. "handler": "public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)",
    603. "predicate": "{ /error, produces [text/html]}",
    604. "details": {
    605. "handlerMethod": {
    606. "className": "org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController",
    607. "name": "errorHtml",
    608. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/springframework/web/servlet/ModelAndView;"
    609. },
    610. "requestMappingConditions": {
    611. "consumes": [],
    612. "headers": [],
    613. "methods": [],
    614. "params": [],
    615. "patterns": ["/error"],
    616. "produces": [{
    617. "mediaType": "text/html",
    618. "negated": false
    619. }]
    620. }
    621. }
    622. }, {
    623. "handler": "public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)",
    624. "predicate": "{ /error}",
    625. "details": {
    626. "handlerMethod": {
    627. "className": "org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController",
    628. "name": "error",
    629. "descriptor": "(Ljavax/servlet/http/HttpServletRequest;)Lorg/springframework/http/ResponseEntity;"
    630. },
    631. "requestMappingConditions": {
    632. "consumes": [],
    633. "headers": [],
    634. "methods": [],
    635. "params": [],
    636. "patterns": ["/error"],
    637. "produces": []
    638. }
    639. }
    640. }, {
    641. "handler": "ResourceHttpRequestHandler ["classpath:/META-INF/resources/webjars/"]",
    642. "predicate": "/webjars/**",
    643. "details": null
    644. }, {
    645. "handler": "ResourceHttpRequestHandler ["classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/", "/"]",
    646. "predicate": "/**",
    647. "details": null
    648. }]
    649. },
    650. "servletFilters": [{
    651. "servletNameMappings": [],
    652. "urlPatternMappings": ["/*"],
    653. "name": "webMvcMetricsFilter",
    654. "className": "org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter"
    655. }, {
    656. "servletNameMappings": [],
    657. "urlPatternMappings": ["/*"],
    658. "name": "requestContextFilter",
    659. "className": "org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter"
    660. }, {
    661. "servletNameMappings": [],
    662. "urlPatternMappings": ["/*"],
    663. "name": "Tomcat WebSocket (JSR356) Filter",
    664. "className": "org.apache.tomcat.websocket.server.WsFilter"
    665. }, {
    666. "servletNameMappings": [],
    667. "urlPatternMappings": ["/*"],
    668. "name": "hiddenHttpMethodFilter",
    669. "className": "org.springframework.boot.web.servlet.filter.OrderedHiddenHttpMethodFilter"
    670. }, {
    671. "servletNameMappings": [],
    672. "urlPatternMappings": ["/*"],
    673. "name": "characterEncodingFilter",
    674. "className": "org.springframework.boot.web.servlet.filter.OrderedCharacterEncodingFilter"
    675. }, {
    676. "servletNameMappings": [],
    677. "urlPatternMappings": ["/*"],
    678. "name": "httpTraceFilter",
    679. "className": "org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter"
    680. }, {
    681. "servletNameMappings": [],
    682. "urlPatternMappings": ["/*"],
    683. "name": "formContentFilter",
    684. "className": "org.springframework.boot.web.servlet.filter.OrderedFormContentFilter"
    685. }],
    686. "servlets": [{
    687. "mappings": [],
    688. "name": "default",
    689. "className": "org.apache.catalina.servlets.DefaultServlet"
    690. }, {
    691. "mappings": ["/"],
    692. "name": "dispatcherServlet",
    693. "className": "org.springframework.web.servlet.DispatcherServlet"
    694. }]
    695. },
    696. "parentId": null
    697. }
    698. }
    699. }
  • 相关阅读:
    OsgOSG读取Tif格式的高程数据(Qt5.14.2+osgEart3.6.5+win10)No13ReadtifFile
    QtQPainter实现图片的绘图、平移、缩放、旋转、扭曲
    Q tQGraphicsView实现图片放大、缩小、鼠标拖动、以鼠标点放大缩小
    小孩名字
    七种方案!探讨Redis分布式锁的正确使用姿势 【转】
    AopContext.currentProxy()事务的传播性
    EF linq (whole word )查询
    JS split 靠正则来分割使结果中包含分隔块
    smarty foreach 实现自动生成多行多列table
    EasyUi 中 js控制 easyuilinkbutton 按钮 是否可用
  • 原文地址:https://www.cnblogs.com/jpfss/p/11936004.html
Copyright © 2020-2023  润新知