IBMBluemix:它能为我们域名的SpringMVC、Postgresql工作吗



我们想看看IBM Bluemix,我们想在基于Spring MVC的应用程序中试用它。我个人从未与IBM Bluemix合作过,因此我欢迎您的帮助。

以下是应用程序的一些要点:

网络应用程序中的技术:

Spring-MVC, Spring-Security, Maven, Java, JSP, JS, PostgreSQL as DB, HTML, CSS

现在,我们已经购买了域名,我们想向IBM Bluemix注册这个域名,这样,当有人点击domain-name.com时,Bluemix上的网络应用程序就会运行。这样我们就不必管理IT基础设施,这是我们的重点这可能吗

如果可以,有人能为我突出一些步骤吗?非常感谢。我正在发布我的Spring配置,以备必要时使用。

root-context.xml:

  <!-- Root Context: defines shared resources visible to all other web components -->
    <context:component-scan base-package="com.journaldev.spring">
        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
    </context:component-scan>
    <context:property-placeholder location="classpath:application.properties"/>
    <beans:bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
                destroy-method="close">
        <beans:property name="driverClassName" value="org.postgresql.Driver"/>
        <beans:property name="url"
                        value="jdbc:postgresql://localhost:port/db"/>
        <beans:property name="username" value="user"
        <beans:property name="password" value="pass"/>
        <beans:property name="removeAbandoned" value="true"/>
        <beans:property name="removeAbandonedTimeout" value="20"/>
        <beans:property name="defaultAutoCommit" value="false"/>
    </beans:bean>
    <!-- Hibernate 4 SessionFactory Bean definition -->
    <beans:bean id="hibernate4AnnotatedSessionFactory"
                class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
        <beans:property name="dataSource" ref="dataSource"/>
        <beans:property name="packagesToScan" value="com.journaldev.spring.model"/>
        <beans:property name="hibernateProperties">
            <beans:props>
                <beans:prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQL9Dialect</beans:prop>
                <beans:prop key="hibernate.show_sql">false</beans:prop>
                <beans:prop key="hibernate.hbm2ddl.auto">update</beans:prop>
                <beans:prop key="cache.use_second_level_cache">true</beans:prop>
                <beans:prop key="cache.use_query_cache">true</beans:prop>
            </beans:props>
        </beans:property>
    </beans:bean>
    <beans:bean id="loginServiceImpl" class="com.journaldev.spring.Login.LoginServiceImpl"/>
    <beans:bean id="hostLoginServiceImpl" class="com.journaldev.spring.Login.HostLoginService"/>
    <beans:bean id="agencyLoginServiceImpl" class="com.journaldev.spring.Login.AgencyLoginService"/>
    <task:annotation-driven/>
    <tx:annotation-driven transaction-manager="transactionManager"/>
    <beans:bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
        <beans:property name="sessionFactory" ref="hibernate4AnnotatedSessionFactory"/>
    </beans:bean>
</beans:beans>

请告诉我。

可以。请在这里查看这份文件。您可以将自己的域指向Bluemix。如果在us-south中运行,则需要指向75.126.81.68A记录。如果在eu-gb中运行,则需要指向5.10.124.142A记录。

您也可以使用自己的SSL证书。

关于您想要移植的应用程序,Bluemix允许您有很多解决方案在云上运行此类应用程序:

  • 在Cloud Foundry上运行的Bluemix liberty运行时与Spring MVC应用程序完全兼容对于这种解决方案,您可以从这里开始

https://www.ng.bluemix.net/docs/#!starter/liberty/index.html#liberty

  • 如果您希望在openjdk和tomcat上运行运行时,可以使用javaCloudFoundry构建包,而不是标准的

  • 如果你想有一个不同于运行时的解决方案,你可以考虑Bluemix上的Docker容器,它提供了一个完整的可移植和可扩展的解决方案以及比运行时更高级别的定制

www.ng.bluemix.net/docs/containers/container_index.html

您可以创建完整的自定义容器,也可以从docker hub 上的一个伟大的容器列表开始

  • 或者你也可以考虑一个基于Openstack的云上虚拟机,实际上是测试版

  • 您可以将运行时/容器/VM绑定到Bluemix 上的PostgreSql云服务

https://www.ng.bluemix.net/docs/#services/PostgreSQL/index.html#PostgreSQL

或Compose在Bluemix 上提供的

最新更新