提交 ed9905da 编写于 作者: S shenhongxi

EnableAutoConfiguration

上级 e88e5710
package com.itlong.whatsmars.spring.boot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
@SpringBootApplication
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
@EnableConfigurationProperties({UserConfig.class})
public class Application {
......
package com.itlong.whatsmars.spring.boot;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
......@@ -12,7 +11,6 @@ import java.util.Map;
* Created by shenhongxi on 2017/3/27.
*/
@Controller
@EnableAutoConfiguration
public class UserController {
@Autowired
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册