当前位置: 首页 > news >正文

专业手机网站公司吗同ip网站做301

专业手机网站公司吗,同ip网站做301,象山县住房建设局网站,网站优化说明SpringBootAdmin是码云上一个以springboot为核心的开源的后台管理系统。这里是链接地址#xff1a;点击打开链接由于是后台系统#xff0c;应该采用数据库分离#xff0c;权限#xff0c;用户#xff0c;角色和业务模块分开。application.properties #服务端口 server.por… SpringBootAdmin是码云上一个以springboot为核心的开源的后台管理系统。这里是链接地址点击打开链接由于是后台系统应该采用数据库分离权限用户角色和业务模块分开。application.properties #服务端口 server.port 8001 # ĿcontextPath server.context-path / # session server.session-timeout60 #which active #spring.profiles.activepro logging.level.com.mys.my.mapper DEBUG#主数据库配置 spring.datasource.master.type com.alibaba.druid.pool.DruidDataSource spring.datasource.master.driver-class-name com.mysql.jdbc.Driver spring.datasource.master.name geekcattle spring.datasource.master.urljdbc:mysql://localhost:3306/geekcattle?useUnicodetruecharacterEncodingUTF-8 spring.datasource.master.username root spring.datasource.master.password 1234 spring.datasource.master.filters stat spring.datasource.master.maxActive 20 spring.datasource.master.initialSize 5 spring.datasource.master.maxWait 60000 spring.datasource.master.minIdle 20 spring.datasource.master.timeBetweenEvictionRunsMillis 60000 spring.datasource.master.minEvictableIdleTimeMillis 300000 spring.datasource.master.validationQuery select x spring.datasource.master.testWhileIdle true spring.datasource.master.testOnBorrow false spring.datasource.master.testOnReturn false spring.datasource.master.poolPreparedStatements true spring.datasource.master.maxOpenPreparedStatements 20#从数据库配置 spring.datasource.film.type com.alibaba.druid.pool.DruidDataSource spring.datasource.film.driver-class-name com.mysql.jdbc.Driver spring.datasource.film.name film spring.datasource.film.urljdbc:mysql://localhost:3306/film?useUnicodetruecharacterEncodingUTF-8 spring.datasource.film.username root spring.datasource.film.password 1234 spring.datasource.film.filters stat spring.datasource.film.maxActive 20 spring.datasource.film.initialSize 1 spring.datasource.film.maxWait 60000 spring.datasource.film.minIdle 20 spring.datasource.film.timeBetweenEvictionRunsMillis 60000 spring.datasource.film.minEvictableIdleTimeMillis 300000 spring.datasource.film.validationQuery select x spring.datasource.film.testWhileIdle true spring.datasource.film.testOnBorrow false spring.datasource.film.testOnReturn false spring.datasource.film.poolPreparedStatements true spring.datasource.film.maxOpenPreparedStatements 20#MVC spring.mvc.view.prefix classpath:/templates/ spring.mvc.view.suffix .html spring.mvc.date-formatyyyy-MM-dd HH:mm:ss # spring.thymeleaf.mode HTML5 spring.thymeleaf.cache false spring.thymeleaf.encoding UTF-8 spring.thymeleaf.content-type text/html #mybaties spring.mapper.plugin tk.mybatis.mapper.generator.MapperPlugin spring.mapper.Mapper com.mys.my.util.CustomerMapper #json spring.jackson.time-zoneAsia/Chongqing spring.jackson.date-formatyyyy-MM-dd HH:mm:ss spring.jackson.joda-date-time-formatyyyy-MM-dd HH:mm:ss# Redis数据库索引默认为0 spring.redis.database1 # Redis服务器地址 spring.redis.host # Redis服务器连接端口 spring.redis.port6379 # Redis服务器连接密码默认为空 spring.redis.password # 连接池最大连接数使用负值表示没有限制 spring.redis.pool.max-active30 # 超时时间 spring.redis.timeout100000 # 连接池中的最大空闲连接 spring.redis.pool.max-idle20 # 连接池最大阻塞等待时间使用负值表示没有限制 spring.redis.pool.max-wait-1MyBatisConfig.java /** Copyright (c) 2017 l_iupeiyuqq.com All rights reserved.*/package com.mys.my.conf;import java.sql.Connection; import java.sql.SQLException; import java.util.Properties;import javax.sql.DataSource;import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.session.SqlSessionFactory; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.SqlSessionTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.PropertySource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.TransactionManagementConfigurer;import com.github.pagehelper.PageHelper; /*** MyBatis基础配置*/ Configuration PropertySource(classpath:application.properties) //EnableTransactionManagement public class MyBatisConfig {// Autowired // DataSource dataSource;Bean(namemasterDataSource)ConfigurationProperties(prefix spring.datasource.master)Primary//默认数据源public DataSource dataSource() {System.out.println(DataSourceBuilder.create().build());return DataSourceBuilder.create().build();}Bean(namemasterSqlSessionFactory)Primary//默认数据源public SqlSessionFactory sqlSessionFactoryBean(Qualifier(masterDataSource) DataSource dataSource) throws SQLException {SqlSessionFactoryBean bean new SqlSessionFactoryBean();System.out.println(dataSourcedataSource);bean.setDataSource(dataSource);bean.setTypeAliasesPackage(com.mys.my.model);//分页插件PageHelper pageHelper new PageHelper();Properties properties new Properties();properties.setProperty(reasonable, true);properties.setProperty(supportMethodsArguments, true);properties.setProperty(returnPageInfo, check);properties.setProperty(params, countcountSql);pageHelper.setProperties(properties);//添加插件bean.setPlugins(new Interceptor[]{pageHelper});//添加XML目录ResourcePatternResolver resolver new PathMatchingResourcePatternResolver();try {bean.setMapperLocations(resolver.getResources(classpath:mapper/*.xml));bean.setMapperLocations(resolver.getResources(classpath:mapper/*/*.xml));return bean.getObject();} catch (Exception e) {e.printStackTrace();throw new RuntimeException(e);}}Bean(masterSqlSessionTemplate)Primarypublic SqlSessionTemplate sqlSessionTemplate(SqlSessionFactory sqlSessionFactory){return new SqlSessionTemplate(sqlSessionFactory);}Bean(masterTransactionManager)Primarypublic PlatformTransactionManager annotationDrivenTransactionManager(Qualifier(masterDataSource) DataSource dataSource) {return new DataSourceTransactionManager(dataSource);} }新建一个数据库配置文件 MyBatisConfigFilm.java /** Copyright (c) 2017 l_iupeiyuqq.com All rights reserved.*/package com.mys.my.conf;import java.sql.SQLException; import java.util.Properties;import javax.sql.DataSource;import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.session.SqlSessionFactory; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.SqlSessionTemplate; import org.mybatis.spring.annotation.MapperScan; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.transaction.PlatformTransactionManager;import com.github.pagehelper.PageHelper; /*** MyBatis基础配置*/ Configuration MapperScan(basePackages{com.mys.my.mapper.fiz},sqlSessionFactoryReffilmSqlSessionFactory) public class MyBatisConfigFilm{Bean(namefilmDatasource)ConfigurationProperties(prefix spring.datasource.film)public DataSource dataSource() {System.out.println(DataSourceBuilder.create().build());return DataSourceBuilder.create().build();}Bean(namefilmSqlSessionFactory)public SqlSessionFactory sqlSessionFactoryBean(Qualifier(filmDatasource) DataSource dataSource) throws SQLException {SqlSessionFactoryBean bean new SqlSessionFactoryBean();System.out.println(dataSourcedataSource());bean.setDataSource(dataSource());bean.setTypeAliasesPackage(com.mys.my.pojo);//分页插件PageHelper pageHelper new PageHelper();Properties properties new Properties();properties.setProperty(reasonable, true);properties.setProperty(supportMethodsArguments, true);properties.setProperty(returnPageInfo, check);properties.setProperty(params, countcountSql);pageHelper.setProperties(properties);//添加插件bean.setPlugins(new Interceptor[]{pageHelper});//添加XML目录ResourcePatternResolver resolver new PathMatchingResourcePatternResolver();try { // bean.setMapperLocations(resolver.getResources(classpath:mapper/*.xml));bean.setMapperLocations(resolver.getResources(classpath:mapper/fiz/*.xml));return bean.getObject();} catch (Exception e) {e.printStackTrace();throw new RuntimeException(e);}}Bean(filmSqlSessionTemplate)public SqlSessionTemplate sqlSessionTemplate(Qualifier(filmSqlSessionFactory)SqlSessionFactory sqlSessionFactory){return new SqlSessionTemplate(sqlSessionFactory);}Bean(name filmTransactionManager)public PlatformTransactionManager annotationDrivenTransactionManager(Qualifier(filmDatasource) DataSource dataSource) {return new DataSourceTransactionManager(dataSource());} } MapperScan(basePackages{com.mys.my.mapper.fiz}的配置是扫描配置的dao文件 *.java bean.setMapperLocations(resolver.getResources(classpath:mapper/fiz/*.xml)); 这个配置是扫描对应的mapper文件 *.xml。 MyBatisMapperScannerConfig.java /** Copyright (c) 2017 l_iupeiyuqq.com All rights reserved.*/package com.mys.my.conf;import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration;//import com.mys.my.mapper.dataSource.MyFilmDatasource;import tk.mybatis.spring.mapper.MapperScannerConfigurer;import java.util.Properties;/*** MyBatis扫描接口使用的tk.mybatis.spring.mapper.MapperScannerConfigurer如果你不使用通用Mapper*/ Configuration //TODO 注意由于MapperScannerConfigurer执行的比较早所以必须有下面的注解 AutoConfigureAfter(MyBatisConfig.class) public class MyBatisMapperScannerConfig {Beanpublic MapperScannerConfigurer mapperScannerConfigurer() {MapperScannerConfigurer mapperScannerConfigurer new MapperScannerConfigurer();mapperScannerConfigurer.setSqlSessionFactoryBeanName(masterSqlSessionFactory);mapperScannerConfigurer.setSqlSessionTemplateBeanName(masterSqlSessionTemplate);mapperScannerConfigurer.setBasePackage(com.mys.my.mapper);Properties properties new Properties();properties.setProperty(mappers, com.mys.my.util.CustomerMapper);properties.setProperty(notEmpty, false);properties.setProperty(IDENTITY, MYSQL);mapperScannerConfigurer.setProperties(properties);return mapperScannerConfigurer;} }
http://www.pierceye.com/news/565234/

相关文章:

  • 营销型网站建设的重要原则爱上链外链购买平台
  • 做视频网站怎么挣钱怎样进入公众号平台登录
  • 有域名怎么做公司网站天河网站建设集团
  • 重庆做网站建设的公司中国企业500强净利润排名
  • 乐亭中关村建站快车免费seo刷排名
  • 购物网站修改注册信息模块的分析查域名是否注册
  • 优秀的定制网站建设公司外汇跟单网站建设
  • 公益网站建设 参考文献赣州专业做网站
  • 梅州建站公司阳性几天就不传染人了
  • 网站建设的简历高端网站设计上海网站建设上海
  • 南京专业网站制作宁波妇科医院私立哪家医院好
  • 西安市建设局官方网站做词云的网站
  • 网站开发人员岗位要求马洪旭 做的网站大学
  • 凡科做网站是否安全网站效果代码
  • 腾讯云做网站干什么用公司的网站建设规划书
  • 网页设计如何设置背景北京建站优化
  • 哈尔滨企业建站模板做emu对网站有什么要求
  • 网站说服力 营销...企业微信自建应用怎么开发
  • 做网站的宽度为多少做义工的网站
  • 现在怎么做网站东莞家居网站建设
  • 制作公司网站的流程代运营公司网站
  • 山东网站策划怎么做58同城黄页推广
  • 如何用手机做钓鱼网站贵阳建设厅网站
  • 网站建设工作自查报告网站建设的心得体会
  • 网站开发项目设计文档产品seo基础优化
  • 建筑工程招聘网站哪个好wordpress ssr
  • 制作一个网站平台做php网站需要什么软件开发
  • 长沙seo网站管理淮北论坛招聘最新消息兼职
  • .net网站源码下载珠海网站建设珠海
  • 网站被降权严重吗企业营销型网站的内容