• 大小: 27.15MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-25
  • 语言: Java
  • 标签: Java项目  

资源简介

网页版的校园生活项目,有学习资料下载,也有餐饮下单,以及其他功能

资源截图

代码片段和文件信息

package com.oolong.config;

import javax.sql.DataSource;

import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.ibatis.logging.LogFactory;
import org.apache.ibatis.session.Configuration;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import com.oolong.service.ServiceHook;

@org.springframework.context.annotation.Configuration
@ComponentScan(basePackageClasses={ServiceHook.class})
@EnableTransactionManagement
public class RootConfig {



@Bean
public DataSource buildDataSource() {

BasicDataSource ds = new BasicDataSource();
ds.setDriverClassName(“com.mysql.jdbc.Driver“);
ds.setUrl(“jdbc:mysql://localhost:3306/schoollifeplatform“);
ds.setUsername(“root“);
ds.setPassword(“123“);
return ds;
}


@Bean
public Configuration buildMyBatisConfig() {
LogFactory.useLog4J2Logging();
Configuration configuration = new Configuration();

return configuration;
}


@Bean(name=“sqlSessionFactory“)
public SqlSessionFactoryBean buildSessionFactory(
DataSource datasource Configuration config) {

SqlSessionFactoryBean factory = new SqlSessionFactoryBean();
factory.setDataSource(datasource);
factory.setConfiguration(config);

return factory;
}

//
@Bean
public MapperScannerConfigurer buildMybatisMapperSacnConfig() {
MapperScannerConfigurer msc = new MapperScannerConfigurer();
msc.setSqlSessionFactoryBeanName(“sqlSessionFactory“);
msc.setbasePackage(“com.oolong.model.mapper“);
return msc;
}

@Bean
public DataSourceTransactionManager transactionManager( 
        BasicDataSource datasource) {
    return  new DataSourceTransactionManager(datasource);
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-12-20 10:58  SchoolLifePlatform\
     文件        5022  2017-12-20 09:10  SchoolLifePlatform\.classpath
     文件        1134  2017-12-18 08:25  SchoolLifePlatform\.project
     目录           0  2017-12-20 10:58  SchoolLifePlatform\.settings\
     文件         567  2016-12-21 09:08  SchoolLifePlatform\.settings\.jsdtscope
     文件         364  2016-12-21 09:08  SchoolLifePlatform\.settings\org.eclipse.jdt.core.prefs
     文件         506  2016-12-21 09:08  SchoolLifePlatform\.settings\org.eclipse.wst.common.component
     文件         305  2017-01-01 21:14  SchoolLifePlatform\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2016-12-21 09:08  SchoolLifePlatform\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2016-12-21 09:08  SchoolLifePlatform\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-12-20 10:58  SchoolLifePlatform\WebContent\
     目录           0  2017-12-20 10:58  SchoolLifePlatform\WebContent\meta-INF\
     文件          39  2016-12-21 09:08  SchoolLifePlatform\WebContent\meta-INF\MANIFEST.MF
     目录           0  2017-12-20 10:58  SchoolLifePlatform\WebContent\WEB-INF\
     目录           0  2018-04-07 15:22  SchoolLifePlatform\WebContent\WEB-INF\doc\
     目录           0  2018-04-07 15:22  SchoolLifePlatform\WebContent\WEB-INF\imags\
     目录           0  2017-12-20 10:58  SchoolLifePlatform\WebContent\WEB-INF\lib\
     文件     1864922  2016-12-15 16:07  SchoolLifePlatform\WebContent\WEB-INF\lib\aspectjweaver.jar
     文件     1576259  2017-12-20 09:10  SchoolLifePlatform\WebContent\WEB-INF\lib\catalina.jar
     文件       41123  2016-12-28 08:56  SchoolLifePlatform\WebContent\WEB-INF\lib\commons-cli-1.2.jar
     文件      174167  2016-12-15 16:07  SchoolLifePlatform\WebContent\WEB-INF\lib\commons-dbcp2-2.1.1.jar
     文件      109043  2016-12-28 08:56  SchoolLifePlatform\WebContent\WEB-INF\lib\commons-io-1.4.jar
     文件       61829  2016-12-15 16:07  SchoolLifePlatform\WebContent\WEB-INF\lib\commons-logging-1.2.jar
     文件      111969  2016-12-15 16:07  SchoolLifePlatform\WebContent\WEB-INF\lib\commons-pool2-2.4.2.jar
     文件      231952  2016-11-23 09:46  SchoolLifePlatform\WebContent\WEB-INF\lib\gson-2.8.0.jar
     文件       45024  2016-12-15 16:07  SchoolLifePlatform\WebContent\WEB-INF\lib\hamcrest-core-1.3.jar
     文件      608084  2016-12-29 20:53  SchoolLifePlatform\WebContent\WEB-INF\lib\javax.mail.jar
     文件       83586  2009-01-02 10:30  SchoolLifePlatform\WebContent\WEB-INF\lib\javax.servlet-3.0.jar
     文件       32054  2016-12-28 08:56  SchoolLifePlatform\WebContent\WEB-INF\lib\jodconverter-2.2.2.jar
     文件        5712  2016-12-28 08:56  SchoolLifePlatform\WebContent\WEB-INF\lib\jodconverter-cli-2.2.2.jar
     文件       55622  2016-12-28 08:56  SchoolLifePlatform\WebContent\WEB-INF\lib\juh-3.0.1.jar
............此处省略345个文件信息

评论

共有 条评论