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

优良的定制网站建设网站建设项目申请ppt

优良的定制网站建设,网站建设项目申请ppt,网站租用服务器,在线涨粉平台1. 配置 #xff08;1#xff09;新建一个项目 #xff08;2#xff09;Build System 那里选择Maven,下一步Create #xff08;3#xff09;配置pom.xml文件 首先查看自己的MYSQL版本#xff1a;进入MySQL命令窗口 我的MYSQL版本是8.0版本的. 下一步#xff0c;…1. 配置 1新建一个项目 2Build System 那里选择Maven,下一步Create 3配置pom.xml文件 首先查看自己的MYSQL版本进入MySQL命令窗口 我的MYSQL版本是8.0版本的. 下一步去Maven官网Maven 点击搜索框输入Java回车 点击下图这个 找到对应版本点击进去比如我的是8.0.28那我就点即8.0.x最新版的8.0.33。 下拉点击Maven复制里边的代码。 回到我们刚创建的Java项目在pom文件中 先写以下代码 dependencies /dependencies再把刚才从Maven中复制的代码放到上面代码的中间。通常情况会报错这是正常的 4setting文件 新建一个setting文件文件后缀是.xml然后在文件中填入下面的代码记住文件路径记得保存。 ?xml version1.0 encodingUTF-8?!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --!--| This is the configuration file for Maven. It can be specified at two levels:|| 1. User Level. This settings.xml file provides configuration for a single user,| and is normally provided in ${user.home}/.m2/settings.xml.|| NOTE: This location can be overridden with the CLI option:|| -s /path/to/user/settings.xml|| 2. Global Level. This settings.xml file provides configuration for all Maven| users on a machine (assuming theyre all using the same Maven| installation). Its normally provided in| ${maven.conf}/settings.xml.|| NOTE: This location can be overridden with the CLI option:|| -gs /path/to/global/settings.xml|| The sections in this sample file are intended to give you a running start at| getting the most out of your Maven installation. Where appropriate, the default| values (values used when the setting is not specified) are provided.||-- settings xmlnshttp://maven.apache.org/SETTINGS/1.2.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd!-- localRepository| The path to the local repository maven will use to store artifacts.|| Default: ${user.home}/.m2/repositorylocalRepository/path/to/local/repo/localRepository--!-- interactiveMode| This will determine whether maven prompts you when it needs input. If set to false,| maven will use a sensible default value, perhaps based on some other setting, for| the parameter in question.|| Default: trueinteractiveModetrue/interactiveMode--!-- offline| Determines whether maven should attempt to connect to the network when executing a build.| This will have an effect on artifact downloads, artifact deployment, and others.|| Default: falseofflinefalse/offline--!-- pluginGroups| This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.| when invoking a command line like mvn prefix:goal. Maven will automatically add the group identifiers| org.apache.maven.plugins and org.codehaus.mojo if these are not already contained in the list.|--pluginGroups!-- pluginGroup| Specifies a further group identifier to use for plugin lookup.pluginGroupcom.your.plugins/pluginGroup--/pluginGroups!-- proxies| This is a list of proxies which can be used on this machine to connect to the network.| Unless otherwise specified (by system property or command-line switch), the first proxy| specification in this list marked as active will be used.|--proxies!-- proxy| Specification for one proxy, to be used in connecting to the network.|proxyidoptional/idactivetrue/activeprotocolhttp/protocolusernameproxyuser/usernamepasswordproxypass/passwordhostproxy.host.net/hostport80/portnonProxyHostslocal.net|some.host.com/nonProxyHosts/proxy--/proxies!-- servers| This is a list of authentication profiles, keyed by the server-id used within the system.| Authentication profiles can be used whenever maven must make a connection to a remote server.|--servers!-- server| Specifies the authentication information to use when connecting to a particular server, identified by| a unique name within the system (referred to by the id attribute below).|| NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are| used together.|serveriddeploymentRepo/idusernamerepouser/usernamepasswordrepopwd/password/server--!-- Another sample, using keys to authenticate.serveridsiteServer/idprivateKey/path/to/private/key/privateKeypassphraseoptional; leave empty if not used./passphrase/server--/servers!-- mirrors| This is a list of mirrors to be used in downloading artifacts from remote repositories.|| It works like this: a POM may declare a repository to use in resolving certain artifacts.| However, this repository may have problems with heavy traffic at times, so people have mirrored| it to several places.|| That repository definition will have a unique id, so we can create a mirror reference for that| repository, to be used as an alternate download site. The mirror site will be the preferred| server for that repository.|--mirrors!-- mirror| Specifies a repository mirror site to use instead of a given repository. The repository that| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.|mirroridmirrorId/idmirrorOfrepositoryId/mirrorOfnameHuman Readable Name for this Mirror./nameurlhttp://my.repository.com/repo/path/url/mirrormirroridnexus-aliyun/idmirrorOf*/mirrorOfnameNexus aliyun/nameurlhttp://maven.aliyun.com/nexus/content/groups/public/url/mirror mirroridmaven-default-http-blocker/idmirrorOfexternal:http:*/mirrorOfnamePseudo repository to mirror external repositories initially using HTTP./nameurlhttp://0.0.0.0//urlblockedtrue/blocked/mirror--mirroridaliyun-public/idmirrorOf*/mirrorOfnamealiyun public/nameurlhttps://maven.aliyun.com/repository/public/url/mirrormirroridaliyun-central/idmirrorOf*/mirrorOfnamealiyun central/nameurlhttps://maven.aliyun.com/repository/central/url/mirrormirroridaliyun-spring/idmirrorOf*/mirrorOfnamealiyun spring/nameurlhttps://maven.aliyun.com/repository/spring/url/mirror/mirrors!-- profiles| This is a list of profiles which can be activated in a variety of ways, and which can modify| the build process. Profiles provided in the settings.xml are intended to provide local machine-| specific paths and repository locations which allow the build to work in the local environment.|| For example, if you have an integration testing plugin - like cactus - that needs to know where| your Tomcat instance is installed, you can provide a variable here such that the variable is| dereferenced during the build process to configure the cactus plugin.|| As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles| section of this document (settings.xml) - will be discussed later. Another way essentially| relies on the detection of a system property, either matching a particular value for the property,| or merely testing its existence. Profiles can also be activated by JDK version prefix, where a| value of 1.4 might activate a profile when the build is executed on a JDK version of 1.4.2_07.| Finally, the list of active profiles can be specified directly from the command line.|| NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact| repositories, plugin repositories, and free-form properties to be used as configuration| variables for plugins in the POM.||--profiles!-- profile| Specifies a set of introductions to the build process, to be activated using one or more of the| mechanisms described above. For inheritance purposes, and to activate profiles via activatedProfiles/| or the command line, profiles have to have an ID that is unique.|| An encouraged best practice for profile identification is to use a consistent naming convention| for profiles, such as env-dev, env-test, env-production, user-jdcasey, user-brett, etc.| This will make it more intuitive to understand what the set of introduced profiles is attempting| to accomplish, particularly when you only have a list of profile ids for debug.|| This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.profileidjdk-1.4/idactivationjdk1.4/jdk/activationrepositoriesrepositoryidjdk14/idnameRepository for JDK 1.4 builds/nameurlhttp://www.myhost.com/maven/jdk14/urllayoutdefault/layoutsnapshotPolicyalways/snapshotPolicy/repository/repositories/profile--!--| Here is another profile, activated by the system property target-env with a value of dev,| which provides a specific path to the Tomcat instance. To use this, your plugin configuration| might hypothetically look like:|| ...| plugin| groupIdorg.myco.myplugins/groupId| artifactIdmyplugin/artifactId|| configuration| tomcatLocation${tomcatPath}/tomcatLocation| /configuration| /plugin| ...|| NOTE: If you just wanted to inject this configuration whenever someone set target-env to| anything, you could just leave off the value/ inside the activation-property.|profileidenv-dev/idactivationpropertynametarget-env/namevaluedev/value/property/activationpropertiestomcatPath/path/to/tomcat/instance/tomcatPath/properties/profile--/profiles!-- activeProfiles| List of profiles that are active for all builds.|activeProfilesactiveProfilealwaysActiveProfile/activeProfileactiveProfileanotherAlwaysActiveProfile/activeProfile/activeProfiles-- /settings按照下图把 User setting file的文件路径改成刚才保存的setting文件路径。 做完上面的之后手动点一下下面的图表重新加载pom过程可能有点慢 最后出现下图的结果配置就完成了。 2. 连接数据库 2.1 student类 package com.model;public class Student {private int id;private String sn;private String name;private String mail;private int classesId;public int getId() {return id;}public void setId(int id) {this.id id;}public String getSn() {return sn;}public void setSn(String sn) {this.sn sn;}public String getName() {return name;}public void setName(String name) {this.name name;}public String getMail() {return mail;}public void setMail(String mail) {this.mail mail;}public int getClassesId() {return classesId;}public void setClassesId(int classesId) {this.classesId classesId;}Overridepublic String toString() {return Student{ id id , sn sn \ , name name \ , mail mail \ , classesId classesId };} } 2.2 Demo01_Connection类 package com;import com.model.Student;import com.mysql.cj.jdbc.MysqlDataSource;import javax.sql.DataSource; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Scanner;public class Demo01_Connection {// 先定义一个数据源对象private static DataSource dataSource null;// 数据库的用户名private static final String USER root;// 数据库的密码private static final String PASSWORD 123456;// 数据库连接字符串private static final String URL jdbc:mysql://127.0.0.1:3306/myjava?characterEncodingutf-8useSSLfalseserverTimezoneAsia/Shanghai;public static void main(String[] args) {// 1. 初化始数据源MysqlDataSource myDataSourse new MysqlDataSource();// 2. 设置连接的参数myDataSourse.setURL(URL);myDataSourse.setUser(USER);myDataSourse.setPassword(PASSWORD);// 3. 把构建好的Mysql数据源赋值给JDBC中的datasourcedataSource myDataSourse;Connection connection null;// 预处理对象//Statement statement null;//危险PreparedStatement statement null;ResultSet resultSet null;try{// 1. 通过数据源获取一个数据库连接connection dataSource.getConnection();// 接收用户输入的值System.out.println(请输入学号);Scanner scanner new Scanner(System.in);String sn scanner.next();// 2. 定义SQL语句 // String sql select * from student where sn sn ;//危险操作String sql select * from student where sn ?;//为占位符System.out.println(sql);// 3. 获取statement对象 // statement connection.createStatement();// 获取一个预处理对象statement connection.prepareStatement(sql);// 处理占位符的值statement.setString(1,sn);// 4. 执行SQLresultSet statement.executeQuery();// 5. 解析结果集,resultSet.next()表示结果集中是否有记录if(resultSet.next()){// 创建表示结果的JAVA对象Student student new Student();// 依次读取结果集中的数据并赋值给JAVA对象student.setId(resultSet.getInt(1));student.setSn(resultSet.getString(2));student.setName(resultSet.getString(3));student.setMail(resultSet.getString(4));student.setClassesId(resultSet.getInt(5));// 打印结果System.out.println(student);}} catch (SQLException e) {throw new RuntimeException(e);} finally {// 依次关闭资源if (resultSet ! null) {try {resultSet.close();} catch (SQLException e) {e.printStackTrace();}}if (statement ! null) {try {statement.close();} catch (SQLException e) {e.printStackTrace();}}if (connection ! null) {try {connection.close();} catch (SQLException e) {e.printStackTrace();}}}} } 2.3 测试结果
文章转载自:
http://www.morning.aowuu.com.gov.cn.aowuu.com
http://www.morning.nxpqw.cn.gov.cn.nxpqw.cn
http://www.morning.ndpwg.cn.gov.cn.ndpwg.cn
http://www.morning.frpm.cn.gov.cn.frpm.cn
http://www.morning.wkmyt.cn.gov.cn.wkmyt.cn
http://www.morning.pplxd.cn.gov.cn.pplxd.cn
http://www.morning.xkzmz.cn.gov.cn.xkzmz.cn
http://www.morning.ndnhf.cn.gov.cn.ndnhf.cn
http://www.morning.prmbb.cn.gov.cn.prmbb.cn
http://www.morning.bmmhs.cn.gov.cn.bmmhs.cn
http://www.morning.sqskm.cn.gov.cn.sqskm.cn
http://www.morning.qgjgsds.com.cn.gov.cn.qgjgsds.com.cn
http://www.morning.trfh.cn.gov.cn.trfh.cn
http://www.morning.lkbyq.cn.gov.cn.lkbyq.cn
http://www.morning.qxlgt.cn.gov.cn.qxlgt.cn
http://www.morning.jrqcj.cn.gov.cn.jrqcj.cn
http://www.morning.hlrtzcj.cn.gov.cn.hlrtzcj.cn
http://www.morning.zlces.com.gov.cn.zlces.com
http://www.morning.hlhqs.cn.gov.cn.hlhqs.cn
http://www.morning.yjknk.cn.gov.cn.yjknk.cn
http://www.morning.yxbrn.cn.gov.cn.yxbrn.cn
http://www.morning.skqfx.cn.gov.cn.skqfx.cn
http://www.morning.tlnkz.cn.gov.cn.tlnkz.cn
http://www.morning.xdwcg.cn.gov.cn.xdwcg.cn
http://www.morning.bwxph.cn.gov.cn.bwxph.cn
http://www.morning.btlsb.cn.gov.cn.btlsb.cn
http://www.morning.lcjw.cn.gov.cn.lcjw.cn
http://www.morning.mcmpq.cn.gov.cn.mcmpq.cn
http://www.morning.bzwxr.cn.gov.cn.bzwxr.cn
http://www.morning.fydsr.cn.gov.cn.fydsr.cn
http://www.morning.nzhzt.cn.gov.cn.nzhzt.cn
http://www.morning.sgbk.cn.gov.cn.sgbk.cn
http://www.morning.drgmr.cn.gov.cn.drgmr.cn
http://www.morning.clpfd.cn.gov.cn.clpfd.cn
http://www.morning.ghcfx.cn.gov.cn.ghcfx.cn
http://www.morning.pyswr.cn.gov.cn.pyswr.cn
http://www.morning.hqllj.cn.gov.cn.hqllj.cn
http://www.morning.lpnb.cn.gov.cn.lpnb.cn
http://www.morning.rzscb.cn.gov.cn.rzscb.cn
http://www.morning.qgtfl.cn.gov.cn.qgtfl.cn
http://www.morning.rbtny.cn.gov.cn.rbtny.cn
http://www.morning.lsfrc.cn.gov.cn.lsfrc.cn
http://www.morning.nkqnn.cn.gov.cn.nkqnn.cn
http://www.morning.dkcpt.cn.gov.cn.dkcpt.cn
http://www.morning.hjjkz.cn.gov.cn.hjjkz.cn
http://www.morning.hkshy.cn.gov.cn.hkshy.cn
http://www.morning.wgqtt.cn.gov.cn.wgqtt.cn
http://www.morning.hxcrd.cn.gov.cn.hxcrd.cn
http://www.morning.crkmm.cn.gov.cn.crkmm.cn
http://www.morning.pqkyx.cn.gov.cn.pqkyx.cn
http://www.morning.kfstq.cn.gov.cn.kfstq.cn
http://www.morning.wcgfy.cn.gov.cn.wcgfy.cn
http://www.morning.qnypp.cn.gov.cn.qnypp.cn
http://www.morning.nlkhr.cn.gov.cn.nlkhr.cn
http://www.morning.qlxgc.cn.gov.cn.qlxgc.cn
http://www.morning.mszls.cn.gov.cn.mszls.cn
http://www.morning.kpbgp.cn.gov.cn.kpbgp.cn
http://www.morning.crhd.cn.gov.cn.crhd.cn
http://www.morning.tfpmf.cn.gov.cn.tfpmf.cn
http://www.morning.0small.cn.gov.cn.0small.cn
http://www.morning.ffydh.cn.gov.cn.ffydh.cn
http://www.morning.hgscb.cn.gov.cn.hgscb.cn
http://www.morning.jqbmj.cn.gov.cn.jqbmj.cn
http://www.morning.qgjgsds.com.cn.gov.cn.qgjgsds.com.cn
http://www.morning.kyflr.cn.gov.cn.kyflr.cn
http://www.morning.wcqkp.cn.gov.cn.wcqkp.cn
http://www.morning.srndk.cn.gov.cn.srndk.cn
http://www.morning.nmlpp.cn.gov.cn.nmlpp.cn
http://www.morning.szoptic.com.gov.cn.szoptic.com
http://www.morning.ntzfj.cn.gov.cn.ntzfj.cn
http://www.morning.nfks.cn.gov.cn.nfks.cn
http://www.morning.rlfr.cn.gov.cn.rlfr.cn
http://www.morning.ummpdl.cn.gov.cn.ummpdl.cn
http://www.morning.zqmdn.cn.gov.cn.zqmdn.cn
http://www.morning.zrpbf.cn.gov.cn.zrpbf.cn
http://www.morning.mqxrx.cn.gov.cn.mqxrx.cn
http://www.morning.jfxth.cn.gov.cn.jfxth.cn
http://www.morning.4q9h.cn.gov.cn.4q9h.cn
http://www.morning.hqsnt.cn.gov.cn.hqsnt.cn
http://www.morning.xtrnx.cn.gov.cn.xtrnx.cn
http://www.tj-hxxt.cn/news/275554.html

相关文章:

  • 图片生成器网站怎么用源码建站
  • asp网站开发实训报告wordpress 鼠标
  • 深圳网站建设app开发商业授权
  • 外国网站 dns解析失败手机网站建设服务
  • 佛山外贸网站建设平台企业网站推广策划方法
  • 旅游网站国内外研究现状wordpress视频去广告插件下载
  • 学校 网站源码开发区二手房
  • 网站怎么做的精致一点手机网站建设系统
  • 虚拟主机建站教程wordpress video插件
  • 设计师网站使用不了网站备案 个人
  • 可以做app的网站企业网站建设 信息安全
  • 网站建设的目的及功能国外做的比较好的网站
  • 网站上传到虚拟主机wordpress怎么实现会员登录
  • 温州文成网站建设网站开发项目实训报告
  • 网站做那个效果好网站建设服务合同 律师
  • 做网站客户改来改去wordpress视频不全屏播放
  • 厦门网站建设建站中心网页制作的原则是什么
  • 网站开发流程包括创新创业大赛项目计划书
  • 建网站自己做服务器小地方做外卖网站怎样
  • 怎么做网站推广最有效做pc端网站案例
  • 家用电脑做网站后台做网站多少钱西宁君博相约
  • 网站建设玖金手指排名15枣庄专业做网站
  • 网站建设拓扑图网络营销的专业知识
  • 网站开发前端与后端区别桂平网络推广
  • 网站 mvc 设计wordpress 链接提交表单
  • 农村自建房室内装修设计效果图泰州seo
  • 怎么建立图片的网站虚拟主机app
  • 百度网站权重查询建设网站的体会
  • wordpress利用DW编辑宁波seo网站排名优化公司
  • 网站开发销售提成联想网站建设摘要