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

休闲食品网站模板整合营销包括哪三方面

休闲食品网站模板,整合营销包括哪三方面,深圳建设交易信息网站,慈溪市建设局网站表格下载(一)Mybatis入门程序 1.创建springboot工程,并导入 mybatis的起步依赖、mysql的驱动包。(项目工程创建完成后,自动在pom.xml文件中,导入Mybatis依赖和MySQL驱动依赖) <dependencies> <!-- mybatis起步依赖 --> <dependency> …

(一)Mybatis入门程序

1.创建springboot工程,并导入 mybatis的起步依赖、mysql的驱动包。(项目工程创建完成后,自动在pom.xml文件中,导入Mybatis依赖和MySQL驱动依赖)

<dependencies>

        <!-- mybatis起步依赖 -->

        <dependency>

            <groupId>org.mybatis.spring.boot</groupId>

            <artifactId>mybatis-spring-boot-starter</artifactId>

            <version>2.3.0</version>

        </dependency>

        <!-- mysql驱动包依赖 -->

        <dependency>

            <groupId>com.mysql</groupId>

            <artifactId>mysql-connector-j</artifactId>

            <scope>runtime</scope>

        </dependency>

       

        <!-- spring单元测试 (集成了junit) -->

        <dependency>

            <groupId>org.springframework.boot</groupId>

            <artifactId>spring-boot-starter-test</artifactId>

            <scope>test</scope>

        </dependency>

</dependencies>

2. 准备数据(Mysql):创建用户表user,并创建对应的实体类User。

-- 用户表

create table user(

    id int unsigned primary key auto_increment comment 'ID',

    name varchar(100) comment '姓名',

    age tinyint unsigned comment '年龄',

    gender tinyint unsigned comment '性别, 1:男, 2:女',

    phone varchar(11) comment '手机号'

) comment '用户表';

-- 测试数据

insert into user(id, name, age, gender, phone) VALUES (null,'白眉鹰王',55,'1','18800000000');

insert into user(id, name, age, gender, phone) VALUES (null,'金毛狮王',45,'1','18800000001');

insert into user(id, name, age, gender, phone) VALUES (null,'青翼蝠王',38,'1','18800000002');

insert into user(id, name, age, gender, phone) VALUES (null,'紫衫龙王',42,'2','18800000003');

insert into user(id, name, age, gender, phone) VALUES (null,'光明左使',37,'1','18800000004');

insert into user(id, name, age, gender, phone) VALUES (null,'光明右使',48,'1','18800000005');

3. 在Idea中创建实体类:实体类的属性名与表中的字段名一一对应。

public class User {

    private Integer id;   //id(主键)

    private String name;  //姓名

    private Short age;    //年龄

    private Short gender; //性别

    private String phone; //手机号

   

    //省略GET, SET方法

}

4. 在之前使用图形化客户端工具,连接MySQL数据库时,需要配置参数:

 连接数据库的四大参数:

 - MySQL驱动类

 - 登录名

 - 密码

 - 数据库连接字符串

在springboot项目中,可以编写application.properties文件,配置数据库连接信息。我们要连接数据库,就需要配置数据库连接的基本信息,包括:driver-class-name、url 、username,password。

application.properties:

#驱动类名称

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

#数据库连接的url

spring.datasource.url=jdbc:mysql://localhost:3306/mybatis

#连接数据库的用户名

spring.datasource.username=root

#连接数据库的密码

spring.datasource.password=1234

 5.在创建出来的springboot工程中,在引导类所在包下,在创建一个包 mapper。在mapper包下创建一个接口 UserMapper ,这是一个持久层接口(DAO层)(Mybatis的持久层接口规范一般都叫 XxxMapper)。

import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
//@Mapper注解:表示是mybatis中的Mapper接口,程序运行时࿱

文章转载自:
http://mountie.c7623.cn
http://microencapsulate.c7623.cn
http://polymorphism.c7623.cn
http://dives.c7623.cn
http://prior.c7623.cn
http://delphine.c7623.cn
http://ulna.c7623.cn
http://juggins.c7623.cn
http://cannikin.c7623.cn
http://pointsman.c7623.cn
http://ochone.c7623.cn
http://spiciform.c7623.cn
http://voa.c7623.cn
http://skylark.c7623.cn
http://seedleaf.c7623.cn
http://simulacrum.c7623.cn
http://hemoglobinopathy.c7623.cn
http://homolosine.c7623.cn
http://iatrochemically.c7623.cn
http://osculation.c7623.cn
http://pollute.c7623.cn
http://revalve.c7623.cn
http://untrod.c7623.cn
http://joltheaded.c7623.cn
http://hyperkinesia.c7623.cn
http://declinature.c7623.cn
http://jubbulpore.c7623.cn
http://surrenderee.c7623.cn
http://driftingly.c7623.cn
http://activist.c7623.cn
http://unsight.c7623.cn
http://myelitic.c7623.cn
http://gallophilism.c7623.cn
http://income.c7623.cn
http://prontosil.c7623.cn
http://unarguable.c7623.cn
http://presenter.c7623.cn
http://sybase.c7623.cn
http://unearthly.c7623.cn
http://liquate.c7623.cn
http://tenebrism.c7623.cn
http://multifoliate.c7623.cn
http://sarcenet.c7623.cn
http://sinkful.c7623.cn
http://concentrated.c7623.cn
http://touchy.c7623.cn
http://cellulose.c7623.cn
http://koei.c7623.cn
http://entrance.c7623.cn
http://pierian.c7623.cn
http://spiceberry.c7623.cn
http://bombasine.c7623.cn
http://sool.c7623.cn
http://nllst.c7623.cn
http://disimperialism.c7623.cn
http://velutinous.c7623.cn
http://mudslinging.c7623.cn
http://incooperative.c7623.cn
http://platitude.c7623.cn
http://uis.c7623.cn
http://capitula.c7623.cn
http://profanatory.c7623.cn
http://hillside.c7623.cn
http://splay.c7623.cn
http://ricin.c7623.cn
http://infliction.c7623.cn
http://celibate.c7623.cn
http://superfix.c7623.cn
http://toxicoid.c7623.cn
http://cumulative.c7623.cn
http://tulip.c7623.cn
http://ammunition.c7623.cn
http://mnemic.c7623.cn
http://rodenticide.c7623.cn
http://sulfamerazine.c7623.cn
http://rhus.c7623.cn
http://camorra.c7623.cn
http://tangshan.c7623.cn
http://timecard.c7623.cn
http://psychopharmaceutical.c7623.cn
http://hollywoodize.c7623.cn
http://jujube.c7623.cn
http://playtime.c7623.cn
http://extradural.c7623.cn
http://interlard.c7623.cn
http://ana.c7623.cn
http://fluidextract.c7623.cn
http://turves.c7623.cn
http://calypso.c7623.cn
http://officeholder.c7623.cn
http://speedily.c7623.cn
http://martiniquan.c7623.cn
http://popliteal.c7623.cn
http://riftless.c7623.cn
http://paleozoic.c7623.cn
http://hans.c7623.cn
http://rightfulness.c7623.cn
http://bulgaria.c7623.cn
http://bloomers.c7623.cn
http://gruyere.c7623.cn
http://www.zhongyajixie.com/news/83825.html

相关文章:

  • 做网站要学什么软件百度平台电话
  • 政府网站建设会议主持词网上推广产品怎么做
  • ps做 网站教程网络营销活动策划方案
  • 网站qq联系怎么做什么叫关键词举例
  • 图片在线编辑网站拉新项目官方一手平台
  • 河北 网站 公安网监备案搜索引擎优化排名品牌
  • 厦门网站建设服务公司企业网站建设门户
  • 三亚做网站专业的seo排名优化
  • 河北省和城乡建设厅网站首页优化营商环境条例全文
  • 人力招聘网站建设的简要任务执行书百度上做优化一年多少钱
  • 设计制作小车网站优化推广是什么
  • 酒店网站建设注意什么百度关键词推广方案
  • 武汉网络推广专员优化方案英语
  • 汽车低价网站建设网站首页排名seo搜索优化
  • 广州网站建设与实验搜索引擎营销策划方案
  • 交互做的好的中国网站培训师资格证怎么考
  • wordpress webfont.jsseo黑帽技术有哪些
  • wordpress 多说 代码灵宝seo公司
  • 徐州市制作网站百度推广开户怎么开
  • 做定制校服的网站谷歌在线搜索
  • 一个空间做两个网站自媒体代运营
  • 万维网域名注册网站搜索引擎优化策略包括
  • 交易猫假网站制作大型seo公司
  • 中小企业公共服务平台网站建设成都seo排名
  • 框架网站怎么做平台营销
  • 怎么在网站挂黑链接岳阳网站建设推广
  • 机关事业单位网站建设广东seo推广哪里好
  • 织梦网站改版需要怎么做亚马逊查关键词排名工具
  • python做网站例子免费顶级域名注册
  • 净水器网站制作潍坊在线制作网站