我正在使用Spring Boot 1.5.6和Hibernate 5以及JSF 2.2。
我的application.properties文件如下:
spring.application.name=BrokersWing
spring.mvc.date-format=DD/MM/YYYY
spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/brokerswing?useSSL=false
spring.datasource.username=root
spring.datasource.password=root
# Hibernate ddl auto (create, create-drop, update): with "update" the database
# schema will be automatically updated accordingly to java entities found in
# the project
spring.jpa.hibernate.ddl-auto=none
spring.jpa.show-sql=true
spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.session.store-type=none
# Allows Hibernate to generate SQL optimized for a particular DBMS
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
我的faces-config文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
</faces-config>
此外,在Web.xml中,我已按如下方式配置Faces Context Servlet:
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*.xhtml</url-pattern>
</servlet-mapping>
现在当我使用jsf h:outputText
标签并尝试在浏览器中输出一些文本时,没有任何事情发生。我点击Run =&gt;运行我的应用程序Spring Boot App。
当我在浏览器中检查HTML时,我看到标签没有转换,并且正如我们在eclipse中看到的那样存在。 You can see the screenshot here.
请您帮我诊断问题并帮我输出文字