2016-07-08 7 views

उत्तर

16

जेस्पर का जवाब पूरी तरह से सही है, लेकिन मैं सभी अंतिमबिंदुओं लगाकर की एक और अधिक सरल तरीके के लिए देख रहा था, और यह, उदा .:

management: 
    context-path: /secure 

-> /secure/env 
-> /secure/health 
... 
management.context-path साथ किया जा सकता
7

अपने application.properties में गुण endpoints.{name}.path सेट करें। उदाहरण के लिए:

endpoints.actuator.path=/secure/actuator 
endpoints.env.path=/secure/env 
endpoints.health.path=/secure/health 
endpoints.info.path=/secure/info 

कि समाप्ति बिंदु पर सुरक्षा को सक्षम करने के true को endpoints.{name}.sensitive निर्धारित किया है। उदाहरण के लिए:

endpoints.health.sensitive=true 

भी देखें Securing sensitive endpoints, Actuator Security और स्प्रिंग बूट संदर्भ दस्तावेज में HTTP health endpoint access restrictions आप अपने आवेदन के प्रवर्तक अंतिम बिंदुओं को सुरक्षित करना चाहते हैं।

application.properties में सेट की गई सामान्य संपत्तियों की एक सूची के लिए स्प्रिंग बूट संदर्भ प्रलेखन में Common application properties देखें।

संबंधित मुद्दे