写给自己的一封记忆

无他,主要是方便自己用,所以。。。。。。。。。。

banner.txt

    ,o888888o.    8 8888      88 `8.`8888.      ,8'  8 8888          .8.          
   8888     `88.  8 8888      88  `8.`8888.    ,8'   8 8888         .888.         
,8 8888       `8. 8 8888      88   `8.`8888.  ,8'    8 8888        :88888.        
88 8888           8 8888      88    `8.`8888.,8'     8 8888       . `88888.       
88 8888           8 8888      88     `8.`88888'      8 8888      .8. `88888.      
88 8888           8 8888      88     .88.`8888.      8 8888     .8`8. `88888.     
88 8888   8888888 8 8888      88    .8'`8.`8888.     8 8888    .8' `8. `88888.    
`8 8888       .8' ` 8888     ,8P   .8'  `8.`8888.    8 8888   .8'   `8. `88888.   
   8888     ,88'    8888   ,d8P   .8'    `8.`8888.   8 8888  .888888888. `88888.  
    `8888888P'       `Y88888P'   .8'      `8.`8888.  8 8888 .8'       `8. `88888. 

 修改图标

 

查询(带条件,key就是之一)

@Service("orderService")
public class OrderServiceImpl extends ServiceImpl<OrderDao, OrderEntity> implements OrderService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String key = (String) params.get("key");
        IPage<OrderEntity> page = this.page(
                new Query<OrderEntity>().getPage(params),
                new QueryWrapper<OrderEntity>()
                .like(StringUtils.isNotBlank(key),"number",key)
        );

        return new PageUtils(page);
    }

}

 



vue   时间插件

<el-form-item label="预付日期" prop="payTime">
        <template>
          <!--加入时间插件-->
          <el-date-picker
            v-model="dataForm.payTime"
            type="datetime"
            placeholder="选择日期时间"
            value-format="timestamp">
          </el-date-picker>
        </template>
      </el-form-item>

vue   单选按钮

  显示时

<!--增加状态按钮-->
<template slot-scope="scope">
  <el-tag v-if="scope.row.delivery === false" size="small" type="danger">没支付</el-tag>
  <el-tag v-else size="small" type="success">已支付</el-tag>
</template>

 

 

  增修时

<el-form-item label="支付状态" prop="delivery">
  <!--<el-input v-model="dataForm.delivery" placeholder="支付状态"></el-input>-->
  <el-radio-group v-model="dataForm.delivery">
    <el-radio :label=true>已支付</el-radio>
    <el-radio :label=false>没支付</el-radio>
  </el-radio-group>
</el-form-item>

 


 

 

vue项目的api地址

后端    项目目录下/static/config    的   index.js

/**
 * 开发环境
 */
;(function () {
  window.SITE_CONFIG = {};

  // api接口请求地址  --->后台地址
  window.SITE_CONFIG['baseUrl'] = 'http://192.168.10.8:8080/xxxx-fast';
  //window.SITE_CONFIG['baseUrl'] = 'http://localhost:8080/xxxx-fast';

  // cdn地址 = 域名 + 版本号
  window.SITE_CONFIG['domain']  = './'; // 域名
  window.SITE_CONFIG['version'] = '';   // 版本号(年月日时分)
  window.SITE_CONFIG['cdnUrl']  = window.SITE_CONFIG.domain + window.SITE_CONFIG.version;
})();

前端项目的api地址      项目目录下/config/index.js

'use strict'
// Template version: 1.2.5
// see http://vuejs-templates.github.io/webpack for documentation.

const path = require('path')
const devEnv = require('./dev.env')

module.exports = {
  dev: {

    // Paths
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    // 代理列表, 是否开启代理通过[./dev.env.js]配置
    proxyTable: devEnv.OPEN_PROXY === false ? {} : {
      '/proxyApi': {
        target: 'http://demo.xxxx.io/xxxx-fast/',
        changeOrigin: true,
        pathRewrite: {
          '^/proxyApi': '/'
        }
      }
    },

    // Various Dev Server settings   ---->感觉是前端的地址
    //host: 'localhost', // can be overwritten by process.env.HOST
    host: '192.168.10.8', // can be overwritten by process.env.HOST
    port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
    autoOpenBrowser: true,
    errorOverlay: true,
    notifyOnErrors: true,
    poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-

    // Use Eslint Loader?
    // If true, your code will be linted during bundling and
    // linting errors and warnings will be shown in the console.
    //useEslint: true,
    useEslint: false,
    // If true, eslint errors and warnings will also be shown in the error overlay
    // in the browser.
    showEslintErrorsInOverlay: false,

    /**
     * Source Maps
     */

    // https://webpack.js.org/configuration/devtool/#development
    devtool: 'eval-source-map',

    // If you have problems debugging vue-files in devtools,
    // set this to false - it *may* help
    // https://vue-loader.vuejs.org/en/options.html#cachebusting
    cacheBusting: true,

    // CSS Sourcemaps off by default because relative paths are "buggy"
    // with this option, according to the CSS-Loader README
    // (https://github.com/webpack/css-loader#sourcemaps)
    // In our experience, they generally work as expected,
    // just be aware of this issue when enabling this option.
    cssSourceMap: false,
  },

  build: {
    // Template for index.html
    index: path.resolve(__dirname, '../dist/index.html'),

    // Paths
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: 'static',
    assetsPublicPath: './',

    /**
     * Source Maps
     */

    productionSourceMap: false,
    // https://webpack.js.org/configuration/devtool/#production
    devtool: '#source-map',

    // Gzip off by default as many popular static hosts such as
    // Surge or Netlify already gzip all static assets for you.
    // Before setting to `true`, make sure to:
    // npm install --save-dev compression-webpack-plugin
    productionGzip: false,
    productionGzipExtensions: ['js', 'css'],

    // Run the build command with an extra argument to
    // View the bundle analyzer report after build finishes:
    // `npm run build --report`
    // Set to `true` or `false` to always turn it on or off
    bundleAnalyzerReport: process.env.npm_config_report
  }
}

 


 

 

 Springboot引入thymeleaf

<!--thymeleaf模板-->
        <dependency>
            <groupId>org.thymeleaf</groupId>
            <artifactId>thymeleaf-spring5</artifactId>
        </dependency>
        <dependency>
            <groupId>org.thymeleaf.extras</groupId>
            <artifactId>thymeleaf-extras-java8time</artifactId>
        </dependency>

要使用thymeleaf,需要在html文件中导入命名空间的约束,方便提示。

 xmlns:th="http://www.thymeleaf.org"

 


 

mysql连接依赖

<dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.15</version>
</dependency>

mybatis依赖

<!-- 引入 myBatis,这是 MyBatis官方提供的适配 Spring Boot 的,而不是Spring Boot自己的-->
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.1.0</version>
        </dependency>

druid依赖

<!-- https://mvnrepository.com/artifact/com.alibaba/druid -->
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>druid</artifactId>
    <version>1.1.12</version>
</dependency>

log4j依赖

 <!-- https://mvnrepository.com/artifact/log4j/log4j -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>

application.yml配置文件

spring:
  datasource:
    username: root
    password: 123456
    #?serverTimezone=UTC解决时区的报错
    url: jdbc:mysql://localhost:3306/shiro?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8
    driver-class-name: com.mysql.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource

    #Spring Boot 默认是不注入这些属性值的,需要自己绑定
    #druid 数据源专有配置
    initialSize: 5
    minIdle: 5
    maxActive: 20
    maxWait: 60000
    timeBetweenEvictionRunsMillis: 60000
    minEvictableIdleTimeMillis: 300000
    validationQuery: SELECT 1 FROM DUAL
    testWhileIdle: true
    testOnBorrow: false
    testOnReturn: false
    poolPreparedStatements: true

    #配置监控统计拦截的filters,stat:监控统计、log4j:日志记录、wall:防御sql注入
    #如果允许时报错  java.lang.ClassNotFoundException: org.apache.log4j.Priority
    #则导入 log4j 依赖即可,Maven 地址: https://mvnrepository.com/artifact/log4j/log4j
    filters: stat,wall,log4j
    maxPoolPreparedStatementPerConnectionSize: 20
    useGlobalDataSourceStat: true
    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500

之后在springboot的配置文件application.properties配置文件集成mybatis

mybatis.type-aliases-package=com.kuang.pojo
mybatis.mapper-locations=classpath:mapper/*.xml

与pojo有关的lombok依赖

<!--快速生成pojo的方法有关的lombok-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.10</version>
        </dependency>

 shiro-thymeleaf的整合包

<!-- thymeleaf-shiro整合包 -->
        <dependency>
            <groupId>com.github.theborakompanioni</groupId>
            <artifactId>thymeleaf-extras-shiro</artifactId>
            <version>2.0.0</version>
        </dependency>
xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro"

 

posted @ 2019-11-21 17:45  白石雁归南  阅读(301)  评论(0编辑  收藏  举报