Package com.jverstry.Configuration

Source Code of com.jverstry.Configuration.TestConfig

package com.jverstry.Configuration;

import com.jverstry.Service.MyService;
import com.jverstry.Service.MyServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.view.InternalResourceViewResolver;

@Configuration
@ComponentScan(basePackages = {
  "com.jverstry.Controller",
  "com.jverstry.DAO",
  "com.jverstry.Item",
  "com.jverstry.Service"
})
public class TestConfig {
 
  @Bean
  public ViewResolver getViewResolver() {
   
    InternalResourceViewResolver resolver = new InternalResourceViewResolver();
    resolver.setPrefix("WEB-INF/pages/");
    resolver.setSuffix(".jsp");

    return resolver;
   
  }
 
  @Bean
  public MyService getMyService() {
    return new MyServiceImpl();
  }
 
}
TOP

Related Classes of com.jverstry.Configuration.TestConfig

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.