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

做个网站得多少钱wordpress添加修改记录

做个网站得多少钱,wordpress添加修改记录,网站建设排序题,郑州市建设厅官方网站这是Project Student的一部分。 其他职位包括带有Jersey的 Web服务 客户端#xff0c;带有Jersey的 Web服务服务器 #xff0c; 业务层 #xff0c; 具有Spring数据的持久性和分片集成测试数据 。 早些时候#xff0c;我们成功地针对持久性/业务层#xff08;使用嵌入式H… 这是Project Student的一部分。 其他职位包括带有Jersey的 Web服务 客户端带有Jersey的 Web服务服务器 业务层 具有Spring数据的持久性和分片集成测试数据 。 早些时候我们成功地针对持久性/业务层使用嵌入式H2数据库和REST服务器/客户端层使用Jetty服务器运行了集成测试。 现在是时候将所有内容编织在一起了。 幸运的是我们已经准备好所有代码并进行了测试。 现在我们要做的就是创建一些配置文件魔术。 局限性 用户身份验证 –尚未进行身份验证的工作。 加密 –尚未对通信进行加密。 容器管理的数据源和JNDI 容器管理的数据源对许多开发人员而言声誉不佳我不确定为什么。 可能与容器管理的持久性CMP混淆 无论如何容器管理的数据源背后的想法很简单。 您无需弄清楚如何在已部署的系统中维护数据库连接参数-无需修改已部署的Web应用程序不安全或从文件系统读取文件您可能无法访问等您只需将问题交给维护Web服务器/应用服务器的人员然后通过JNDI检索值。 Tomcat和Jetty需要在XML文件中进行手动配置。 像JBoss和GlassFish这样的更高级的应用服务器使您可以通过漂亮的GUI配置数据源。 其实并不重要因为您只需要执行一次。 Tomcat 7和Jetty的说明 。 Tomcat的关键点是服务器库位于$ CATALINA_HOME / lib下 并且可能不在您期望的位置。 例如在Ubuntu中它是/ usr / share / tomcat7 / lib 而不是/ var / lib / tomcat7 / lib 。 其次如果未从.war文件中提取META-INF / context.xml文件则必须将其放置在conf / Catalina / localhost / student-ws-webapp.xml 或任何已命名为.war文件的文件下。 后者会覆盖前者因此通常将.war文件设置为在开发环境中运行然后在测试和生产环境中覆盖配置。 META-INF / context.xml Tomcat ?xml version1.0 encodingUTF-8? ContextResource namejdbc/studentDSauthContainertypejavax.sql.DataSourcedriverClassNameorg.postgresql.Driverurljdbc:postgresql:studentusernamestudentpasswordstudentmaxActive20maxIdle10maxWait-1factoryorg.apache.commons.dbcp.BasicDataSourceFactory //Context 值得注意的是通过JNDI作为java.lang.String传递加密密钥很简单。 对于修改已部署的Web应用程序或访问服务器的文件系统的需求这具有与前面讨论的相同的好处。 由于您希望实际的加密密钥既需要JNDI密钥又需要基于文件系统的盐因此实现起来要复杂一些但这在webapp的初始部署过程中很容易处理。 JPA配置 我们的persistence.xml文件非常少。 我们通常需要两个持久性单元一个用于JTA事务生产另一个用于非JTA事务开发和测试。 META-INF / persistence.xml ?xml version1.0 encodingUTF-8? persistence xmlnshttp://java.sun.com/xml/ns/persistencexmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsdversion1.0persistence-unit namestudentPU-localtransaction-typeRESOURCE_LOCALproviderorg.hibernate.ejb.HibernatePersistence/providernon-jta-data-sourcejdbc/studentDS/non-jta-data-source/persistence-unit /persistence网页配置 web.xml文件与集成测试中使用的文件几乎相同。 关键区别在于它为容器提供的数据源获取资源引用。 WEB-INF / web.xml ?xml version1.0 encodingUTF-8? web-app version2.5 xmlnshttp://java.sun.com/xml/ns/javaeexmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsddisplay-nameProject Student Webservice/display-namecontext-paramparam-namecontextClass/param-nameparam-valueorg.springframework.web.context.support.AnnotationConfigWebApplicationContext/param-value/context-paramcontext-paramparam-namecontextConfigLocation/param-nameparam-valuecom.invariantproperties.sandbox.student.config.PersistenceJpaConfigcom.invariantproperties.sandbox.student.config.BusinessApplicationContextcom.invariantproperties.sandbox.student.webservice.config.RestApplicationContext/param-value/context-paramlistenerlistener-classorg.springframework.web.context.ContextLoaderListener/listener-class/listenerservletservlet-nameREST dispatcher/servlet-nameservlet-classcom.sun.jersey.spi.spring.container.servlet.SpringServlet/servlet-classinit-paramparam-namespring.profiles.active/param-nameparam-valuetest/param-value/init-param/servletservlet-mappingservlet-nameREST dispatcher/servlet-nameurl-pattern/rest/*/url-pattern/servlet-mappingresource-refdescriptionStudent Datasource/descriptionres-ref-namejdbc/studentDS/res-ref-nameres-typejavax.sql.DataSource/res-typeres-authContainer/res-auth/resource-ref /web-app弹簧配置 由于两个更改持久层的Spring配置与以前有很大不同。 从风格上讲由于不再需要处理嵌入式数据库因此可以使用标准配置文件而不是配置类。 更为重要的更改是我们已将所有数据源配置移至容器并且可以从我们的spring配置中删除它。 我们需要指向正确的数据源和持久性单元仅此而已 applicationContext-dao.xml ?xml version1.0 encodingUTF-8? beans xmlnshttp://www.springframework.org/schema/beansxmlns:contexthttp://www.springframework.org/schema/context xmlns:txhttp://www.springframework.org/schema/txxmlns:jpahttp://www.springframework.org/schema/data/jpa xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexmlns:jeehttp://www.springframework.org/schema/jeexsi:schemaLocationhttp://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.2.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.2.xsdhttp://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-3.2.xsdhttp://www.springframework.org/schema/data/jpahttp://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsdhttp://www.springframework.org/schema/jeehttp://www.springframework.org/schema/jee/spring-jee-3.0.xsdcontext:property-placeholder locationWEB-INF/database.properties /context:annotation-config /!-- we use container-based datasource --jee:jndi-lookup iddataSource jndi-name${persistence.unit.dataSource}expected-typejavax.sql.DataSource /bean nameentityManagerFactoryclassorg.springframework.orm.jpa.LocalContainerEntityManagerFactoryBeanproperty namedataSource refdataSource /property namepersistenceUnitName value${persistence.unit.name} /property namepackagesToScan value${entitymanager.packages.to.scan} /property namejpaVendorAdapterbean classorg.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter //property/beanbean nametransactionManager classorg.springframework.orm.jpa.JpaTransactionManager /bean nameexceptionTranslationclassorg.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor /tx:annotation-driven transaction-managertransactionManagerproxy-target-classfalse //beans 我们的属性文件仅包含数据源的名称持久性单元名称以及包含JPA批注的要扫描的软件包列表。 WEB-INF / database.properties # jpa configuration entitymanager.packages.to.scancom.invariantproperties.sandbox.student.domain persistence.unit.dataSourcejava:comp/env/jdbc/studentDS persistence.unit.namestudentPU-local数据库架构和安全性 最后集成测试可以使用Hibernate自动创建功能但是我们应该始终在开发和生产环境中明确维护我们的架构。 除了避免自动化工具以意想不到的方式发挥作用而带来的潜在问题之外这还使我们能够维护基础架构的价值。 在投入生产之前编写和测试升级和降级脚本非常重要。 如果出现问题我们总是需要一种可以正常恢复的方法。 更重要的是我们的数据库架构应始终由Webapp之外的其他用户拥有。 例如Web应用程序可以对“学生所有者”创建的表使用“学生用户”。 这将防止使用SQL注入的攻击者删除或修改表。 -- -- for security this must run as student-owner, not student-user! ---- -- create an idempotent stored procedure that creates the initial database schema. -- create or replace function create_schema_0_0_2() returns void as $$ declareschema_version_rec record;schema_count int; begincreate table if not exists schema_version (schema_version varchar(20) not null);select count(*) into schema_count from schema_version;case schema_countwhen 0 then-- we just created tableinsert into schema_version(schema_version) values(0.0.2);when 1 then-- this is create so we only need to make sure its current version-- normally we accept either current version or immediately prior version.select * into strict schema_version_rec from schema_version;if schema_version_rec.schema_version 0.0.2 thenraise notice Unwilling to run updates - check prior version;exit;end if; elseraise notice Bad database - more than one schema versions defined!;exit;end case;-- create tables!create table if not exists test_run (test_run_pkey int primary key,uuid varchar(40) unique not null,creation_date timestamp not null,name varchar(80) not null,test_date timestamp not null,username varchar(40) not null);create table if not exists classroom (classroom_pkey int primary key,uuid varchar(40) unique not null,creation_date timestamp not null,test_run_pkey int references test_run(test_run_pkey),name varchar(80) not null);create table if not exists course (course_pkey int primary key,uuid varchar(40) unique not null,creation_date timestamp not null,test_run_pkey int references test_run(test_run_pkey),name varchar(80) not null);create table if not exists instructor (instructor_pkey int primary key,uuid varchar(40) unique not null,creation_date timestamp not null,test_run_pkey int references test_run(test_run_pkey),name varchar(80) not null,email varchar(200) unique not null);create table if not exists section (section_pkey int primary key,uuid varchar(40) unique not null,creation_date timestamp not null,test_run_pkey int references test_run(test_run_pkey),name varchar(80) not null);create table if not exists student (student_pkey int primary key,uuid varchar(40) unique not null,creation_date timestamp not null,test_run_pkey int references test_run(test_run_pkey),name varchar(80) not null,email varchar(200) unique not null);create table if not exists term (term_pkey int primary key,uuid varchar(40) unique not null,creation_date timestamp not null,test_run_pkey int references test_run(test_run_pkey),name varchar(80) not null);-- correction: need to define this!create sequence hibernate_sequence;-- make sure nobody can truncate our tablesrevoke truncate on classroom, course, instructor, section, student, term, test_run from public;-- grant CRUD privileges to student-user.grant select, insert, update, delete on classroom, course, instructor, section, student, term, test_run to student;grant usage on hibernate_sequence to student;return; end; $$ language plpgsql;-- create database schema select create_schema_0_0_2() is null;-- clean up drop function create_schema_0_0_2();整合测试 我们可以重用来自Web服务服务的集成测试但是自1以来我还没有将其复制到该项目中。我讨厌复制代码最好将集成测试放入服务器和webapp都使用的单独项目中以及2配置Jetty来提供JNDI值很容易但是由于某种原因记录在案的类抛出了异常并且花很多时间进行研究还不够重要此时。 源代码 可从http://code.google.com/p/invariant-properties-blog/source/browse/student获取源代码。 更正 提供的模式忽略了创建新对象所需的“ hibernate_sequence”。 它必须由“学生”用户定义并可读。 参考 项目学生 Invariant Properties博客上的JCG合作伙伴 Bear Giles的Web服务集成 。 翻译自: https://www.javacodegeeks.com/2014/01/project-student-webservice-integration.html
http://www.pierceye.com/news/582223/

相关文章:

  • 沈阳自助建站模板网站建设想法
  • 湖南岳阳网站建设公司黄页顺企网怎样不让网站被收录
  • 有没有专门做翻译的网站安徽建设工程信息网招标公告
  • 保险咨询网站留电话中国十大网络公司排行榜
  • 领手工在家做的网站2019网页设计与实现论文
  • 兰州微信信息平台网站建设绍兴本地网站建设
  • 关于旅游网站策划书千锋前端培训多少钱
  • 温州网站建设结构做代练网站能备案
  • 零基础学习做网站第三方装修评估公司
  • 基础微网站开发动态网站彩票投注员做啥的
  • 西安做网站设计公司爱做网站免费版
  • 效果图网站接单重庆一般建一个网站需要多少钱
  • 网站建设征求意见稿辅料企业网站建设费用
  • 上海网站建设公司服务沅江网站制作
  • 公司网站开发费用计入什么科目虚拟主机怎么建网站
  • 天津网站建设技术网页设计与制作教程版徐洪亮课后答案
  • 旅游网站建设方案简介用asp做的网站打开页面很慢
  • 做影视网站 片源从哪里来做自媒体的上那些网站
  • 邢台网站开发百度云 做网站
  • 淘宝优惠劵网站建设wordpress主题 简洁
  • 自己做电影资源网站揭阳新闻最新消息
  • 北碚免费建站哪家做得好佛山网站建设设计
  • 怎么做网站拍卖的那种wordpress主题搜索图标
  • 三亚网站建设平台查数据的权威网站
  • html网站制作答辩ppt网站备份和备案的区别
  • 网站开发需要工具免费的ps软件
  • 常州网站建设优质商家重庆互联网怎么样
  • 做网站发广告动漫网页设计报告
  • 求职招聘网站建设投标书沈阳网站建设的公司哪家好
  • 做导航网站有发展吗南京企业网站制作哪家好