Comments (2)
Hi Marco,
Looking at the example, I think you'd want to follow the 'Java built in
server' way. That is register the properties
"com.sun.jersey.spi.container.ContainerRequestFilters",
"com.sun.jersey.api.container.filter.LoggingFilter;com.myprogram.AuthFilter"
Not sure how simple that is. Two options are too set the DefaultResources
or DefaultJaxRsPackages via ConfigurableModule. Both result in
ResourceConfiguration.register being called rather than property.
Alternatively you could simply add
@Getterprivate static volatile ConcurrentMap<String, List>
propertiesMap = Maps.newConcurrentMap();
To the JerseyRestApplication class and use it to set Properties on the
ResourceConfiguration.
In that case, just add the Properties to Module / ConfigurableModule in the
usual way and make sure they get copied across in the
JerseySpringIntegrationContextListener. (It's basically following the exact
same pattern as per Packages or Resources).
On Mon, Jul 27, 2015 at 2:26 PM, Marco Castigliego <[email protected]
wrote:
Hey guys,
I'd like to add a ContainerRequestFilter to implement some authorization
code (similar to this
https://simplapi.wordpress.com/2013/01/24/jersey-jax-rs-implements-a-http-basic-auth-decoder/
).Do you know how can I do this using microservice?
Thanks :)
—
Reply to this email directly or view it on GitHub
#31.
from micro-server.
Cool, thanks John.
I think I achieved what I wanted simply creating a spring component that implements javax.servlet.Filter and com.aol.micro.server.auto.discovery.FilterConfiguration.
:) Thanks for the help!
Marco
from micro-server.
Related Issues (20)
- Update Micro-server to latest version of cyclops and cyclops-React HOT 1
- Common interface for DistributedCache in micro-server HOT 1
- Upgrade micro-server to latest version of cylops and cyclops-react HOT 1
- Remove compile dependancy on lombok HOT 1
- Rename Elasti-cache plugin to micro-memcached
- GenericEvent in micro-event plugin HOT 1
- Define useful toString() on FormattedErrorCode
- API changes report for Microserver Core
- Upgrade to Cyclops X: M2 HOT 1
- Message on service startup is incorrect. HOT 1
- Upgrade hibernate as it is not compatible with the latest version of mysql-connector HOT 1
- Add ip to service-registry plugin
- Upgrade to cyclops 10.0.3
- Upgrade to Spring 5
- Upgrade to Spring Boot 2.1.0
- Work as pure Microservices Plugin offering for Spring Boot
- Remove unneeded modules
- Rename aws modules to make aws clear in the name
- Broken micro-server url
- Add GarbageCollectorMXBean to micro-jmx-metrics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micro-server.