我正在尝试基于此链接在我的本地 tomcat 安装中部署 restSQL。
从我的 tomcat webapps 文件夹中:
webapps\restsql-0.8\WEB-INF\classes\resources\properties
我已修改'default-restsql.properties'
以设置正确的数据库连接
'sqlresources.dir=/resources/xml/sqlresources'
并在该位置添加/创建文件夹时保留该属性。
我也在 web.xml 中进行了修改:
<context-param>
<param-name>org.restsql.properties</param-name>
<param-value>/WEB-INF/resources/properties/default-restsql.properties</param-value>
</context-param>
我很确定default.restsql.properties
自从我访问此资源时就已加载:
http://localhost:8080/restsql-0.8/conf
我得到这个回应:
Properties loaded from /resources/properties/default-restsql.properties:
log4j.configuration = resources/properties/default-log4j.properties
org.restsql.security.Authorizer = org.restsql.security.impl.AuthorizerImpl
org.restsql.core.RequestLogger = org.restsql.core.impl.RequestLoggerImpl
**sqlresources.dir = /resources/xml/sqlresources**
database.driverClassName = com.mysql.jdbc.Driver
logging.config = resources/properties/default-log4j.properties
database.user = root
org.restsql.core.Factory.ResponseSerializerFactory = org.restsql.core.impl.ResponseSerializerFactoryImpl
org.restsql.core.SqlBuilder = org.restsql.core.impl.SqlBuilderImpl
database.password = root
org.restsql.core.Factory.ConnectionFactory = org.restsql.core.impl.ConnectionFactoryImpl
org.restsql.core.SqlResourceMetaData = org.restsql.core.impl.SqlResourceMetaDataMySql
org.restsql.core.HttpRequestAttributes = org.restsql.core.impl.HttpRequestAttributesImpl
logging.facility = log4j
response.useXmlSchema = false
org.restsql.core.Factory.RequestFactory = org.restsql.core.impl.RequestFactoryImpl
database.url = jdbc:mysql://localhost:3306/
logging.dir = /var/log/restsql
org.restsql.core.Factory.SqlResourceFactory = org.restsql.core.impl.SqlResourceFactoryImpl
request.useXmlSchema = false
response.useXmlDirective = false
org.restsql.core.Factory.RequestDeserializerFactory = org.restsql.core.impl.RequestDeserializerFactoryImpl
Properties using defaults:
org.restsql.core.Factory.Connection = org.restsql.core.impl.ConnectionFactoryImpl
java.util.logging.config.file = resources/properties/default-logging.properties
request.useXmlDirective = false
org.restsql.properties = /resources/properties/default-restsql.properties
但是,当我访问此资源时
http://localhost:8080/restsql-0.8/res/
我得到这个回应:
SQL 资源目录 /resources/xml/sqlresources 不存在...请更正您的 restsql.properties 文件中的 sqlresources.dir 属性
尽管该文件夹确实存在:webapps\restsql-0.8\WEB-INF\classes\resources\xml\sqlresources
可能是什么问题呢?