1. 它是一款轻量级 Java Web 框架,基于MVC架构 - 内置 IOC、AOP、ORM、DAO、MVC 等特性 在 `resources` 目录下,创建一个名为 `jfast.properties` 的文件,内容如下: jfast.basePackage=com.jfast jfast.viewType=jsp jfast.baseViewPath=/WEB-INF/jsp/
jfast.dataSource.url=jdbc:mysql://localhost:3306/jfast?characterEncoding=utf8
jfast.dataSource.username=root
jfast.dataSource.password=123456
@RequestManpping("/")public class HelloController{ @Inject private JfastService jfastService; public void login(){ jfastService.helloService(); } @RequestManpping("/exit") public void exit(){ jfastService.helloService(); }}
public interface JfastService {
public void helloService();
}
@Bean
public class JfastServiceImpl implements JfastService{
public void helloService(){
System.out.println("helloService") }} |