
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
zone.cogni.lib.methodtimer:methodtimer
Advanced tools
Easy way to add http headers based on configuration.
implementation("zone.cogni.lib:httpheaders:0.0.3")
Just add this in your @Configuration
or @SpringBootApplication
class
@EnableHttpHeaders
cognizone:
http:
headers:
- type: plain
key: X-Frame-Options
value: sameorigin
- type: plain
key: X-My-Server
value: El serveros
Note 1: type
can be omitted. If not set default plain
will be used.
Note 2: At the moment, type
can only be equal to plain
.
This will just return the value as specified in the configuration.
In the future types like spelExpression
and such can be added.
Library that can report how much time each method execution takes by just adding an annotation.
Note, due to default spring class-proxy limitations for Beans, annotations will only be picked up when called from outside the Bean. A workaround for this is being created.
implementation("zone.cogni.lib:methodtimer:0.0.3")
Method timer needs to have aspectJ proxying enabled:
Just add @EnableAspectJAutoProxy
in your @Configuration
or @SpringBootApplication
class.
To enable the timers just add this (by default timers are disabled). In java
cognizone:
methodtimer:
enabled: true
Just add @TimedMethod
annotation to the method to be timed (needs to be a method inside a Bean that is called from the outside).
simple classname
+ method name
.
You can overwrite this by setting the value()
of the @TimedMethod
annotation.@TimerName
on parameters of the method.
This will do a toString()
on that method parameter and the result is appended to the default timer name.@TimedMethod
annotation is hit in a thread, a new timer is started.
Once that method finishes, the timers of all annotated methods will be reported.
canBeParent
to false on @TimedMethod
.zone.cogni.lib.methodtimer.impl.Slf4jTimerReport
.FAQs
Unknown package
We found that zone.cogni.lib.methodtimer:methodtimer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.