Do this ;

Create mybatis-config.xml file and name it as such.
Create your mappers xml files

Now if you are using guice, you already know about modules. MybatisGuice
gives you another module  thats instantiated as
  Module module = new XMLMybatisModule(){
             //set environment id
    }

Then use the module among your other modules.

Regards.
Josh.

On Tue, Apr 3, 2012 at 11:25 AM, Fabrizio Starred <[email protected]> wrote:

> I have already looked for mybatis guice 
> here<http://www.mybatis.org/guice/core.html> but
> I can't understand where to place the example code written there.
>
> I guess the last section *MyBatis XML Bootstrap *is good for me as well
> as *MyBatis Bootstrap, *
> but with only these pieces of code I can't set up a configuration for a
> web app.
> Thus SqlSessionFactoryProvider*  *is not mentioned either in the manual
> reference guice
>
> Il giorno martedì 3 aprile 2012 09:18:35 UTC+2, Joshnet ha scritto:
>
>> Why not use mybatis-guice project.  There is a detailed user guide on how
>> to use.
>>
>> Regards.
>> Josh.
>>
>> On Tue, Apr 3, 2012 at 1:04 AM, Fabrizio Starred <[email protected]>wrote:
>>
>>> I was searching for a smart example of dependancy injection of
>>> the SqlSessionFactory, as the mybatis manual suggested.
>>>
>>> I have already gave a look of other examples on the site, but none show
>>> me the simple stuff I need, also because I would not inject the mappers too.
>>>
>>> Anyone can help me ?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "google-guice" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/google-guice/-/**uznbuH4W86kJ<https://groups.google.com/d/msg/google-guice/-/uznbuH4W86kJ>
>>> .
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to google-guice+unsubscribe@*
>>> *googlegroups.com <google-guice%[email protected]>.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/google-guice?hl=en<http://groups.google.com/group/google-guice?hl=en>
>>> .
>>>
>>
>>
> Il giorno martedì 3 aprile 2012 09:18:35 UTC+2, Joshnet ha scritto:
>
>> Why not use mybatis-guice project.  There is a detailed user guide on how
>> to use.
>>
>> Regards.
>> Josh.
>>
>> On Tue, Apr 3, 2012 at 1:04 AM, Fabrizio Starred <[email protected]>wrote:
>>
>>> I was searching for a smart example of dependancy injection of
>>> the SqlSessionFactory, as the mybatis manual suggested.
>>>
>>> I have already gave a look of other examples on the site, but none show
>>> me the simple stuff I need, also because I would not inject the mappers too.
>>>
>>> Anyone can help me ?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "google-guice" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/google-guice/-/**uznbuH4W86kJ<https://groups.google.com/d/msg/google-guice/-/uznbuH4W86kJ>
>>> .
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to google-guice+unsubscribe@*
>>> *googlegroups.com <google-guice%[email protected]>.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/google-guice?hl=en<http://groups.google.com/group/google-guice?hl=en>
>>> .
>>>
>>
>>
> Il giorno martedì 3 aprile 2012 09:18:35 UTC+2, Joshnet ha scritto:
>
>> Why not use mybatis-guice project.  There is a detailed user guide on how
>> to use.
>>
>> Regards.
>> Josh.
>>
>> On Tue, Apr 3, 2012 at 1:04 AM, Fabrizio Starred <[email protected]>wrote:
>>
>>> I was searching for a smart example of dependancy injection of
>>> the SqlSessionFactory, as the mybatis manual suggested.
>>>
>>> I have already gave a look of other examples on the site, but none show
>>> me the simple stuff I need, also because I would not inject the mappers too.
>>>
>>> Anyone can help me ?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "google-guice" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/google-guice/-/**uznbuH4W86kJ<https://groups.google.com/d/msg/google-guice/-/uznbuH4W86kJ>
>>> .
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to google-guice+unsubscribe@*
>>> *googlegroups.com <google-guice%[email protected]>.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/google-guice?hl=en<http://groups.google.com/group/google-guice?hl=en>
>>> .
>>>
>>
>>
> Il giorno martedì 3 aprile 2012 09:18:35 UTC+2, Joshnet ha scritto:
>
>> Why not use mybatis-guice project.  There is a detailed user guide on how
>> to use.
>>
>> Regards.
>> Josh.
>>
>> On Tue, Apr 3, 2012 at 1:04 AM, Fabrizio Starred <[email protected]>wrote:
>>
>>> I was searching for a smart example of dependancy injection of
>>> the SqlSessionFactory, as the mybatis manual suggested.
>>>
>>> I have already gave a look of other examples on the site, but none show
>>> me the simple stuff I need, also because I would not inject the mappers too.
>>>
>>> Anyone can help me ?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "google-guice" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/google-guice/-/**uznbuH4W86kJ<https://groups.google.com/d/msg/google-guice/-/uznbuH4W86kJ>
>>> .
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to google-guice+unsubscribe@*
>>> *googlegroups.com <google-guice%[email protected]>.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/google-guice?hl=en<http://groups.google.com/group/google-guice?hl=en>
>>> .
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "google-guice" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-guice/-/aJLUfPnzzYMJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-guice?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to