gchm2010 / simple-spring-memcached

Automatically exported from code.google.com/p/simple-spring-memcached
MIT License
0 stars 0 forks source link

Java based configuration #25

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice to have java based configuration like 
"org.springframework.cache.annotation.EnableCaching". 

Original issue reported on code.google.com by cemalettin.koc@gmail.com on 22 Jan 2014 at 1:22

GoogleCodeExporter commented 8 years ago
Yes it will be a nice and useful feature. I'll will think how it can be 
implemented. Do you have an idea what exactly should be configured and how 
using java based configuration? My concern is how to distinguish between 
spymemcached and xmemcached providers without merging everything to one module. 

Original comment by ragno...@gmail.com on 23 Jan 2014 at 7:31

GoogleCodeExporter commented 8 years ago
I am not familiar with your library very much but there are good example about 
this java configuration. For example, you can look at Spring Security Project. 
They have extensive java configuration support. If you need some more help, I 
would give a try a basic example.  

Yesterday I tried to use your library for a hello world cache example and It 
was working nice. Here is the gist for the configuration: 
https://gist.github.com/cemo/45f3988825aa752872a9  

Original comment by cemalettin.koc@gmail.com on 23 Jan 2014 at 9:10

GoogleCodeExporter commented 8 years ago
Thanks! So basically java based configuration works for SSM, right? The only 
thing that I should get rid of is the required import statement: <import 
resource="simplesm-context.xml" /> then SSM can be configured using java. Am I 
right or miss something?
Can I use your example in documentation?

Original comment by ragno...@gmail.com on 24 Jan 2014 at 9:03

GoogleCodeExporter commented 8 years ago
Yes, this is a very basic working example for Spring annotations. But there is 
a MemcacheConfiguration which is our internal class. It must be changed to 
according to needs. Of course you can use this but as I said it needs to be a 
little bid polished.

Also simplesm-context.xml can be provided with @ImportResource(value = 
"simplesm-context.xml"). A hybrid solution will also work nicely. 

But your libary has great potential with java configuration more than this. 
Java configuration can reveal hidden gems easily. I will try to provide a 
comprehensive configuration after learning your library.  

I think that a maven javaconfig module might be added as spring-security 
project. Spring-security had such a module then It was merged with core module. 
 But I need some time to learn your library before giving a try.  :)      

Original comment by cemalettin.koc@gmail.com on 24 Jan 2014 at 9:32

GoogleCodeExporter commented 8 years ago
This issue has been moved to github: 
https://github.com/ragnor/simple-spring-memcached/issues/25

Original comment by ragno...@gmail.com on 24 Feb 2014 at 5:50