com.test.spring.SpringAppConfig.java Source code

Java tutorial

Introduction

Here is the source code for com.test.spring.SpringAppConfig.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.test.spring;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
@EnableWebMvc
public class SpringAppConfig extends WebMvcConfigurerAdapter {

    @Bean
    public HelloController controller() {
        return new HelloController();
    }
}