AIT Training

Im thinking about joining the air force or the navy. I was wondering what would happen if I have a long ait training stay? Lets just say a year as an example. Im married, so will my husband be able to come too or do we have to be apart for the whole year?