Spring Configuration

前端 未结 5 1279
情深已故
情深已故 2020-12-14 09:48

I\'ve been reading up on Spring and it keeps talking about the spring configuration data you need, but where do you put this xml file? and what do you save it as? I can\'t s

5条回答
  •  别那么骄傲
    2020-12-14 10:21

    It depends what your application is, some applications support the configuration of Spring, in this case you will need to check that frameworks documentation.

    If it is a standalone application then you can put the file anywhere, but generally it is placed in

    src/main/resources
    

    or a subdirectory in resources.

    Section 3.2.2 of the Spring docs shows u how to instantiate the ApplicationContext.

提交回复
热议问题