腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
Spring
通过@Value从@PropertySource注入java.util.Properties或Map
java
、
spring
application.properties", "
classpath
:hibernate.properties",我希望以java.util.Properties对象的形式检索所有
浏览 0
提问于2014-07-23
得票数 3
回答已采纳
2
回答
在eclipse中工作良好,但如果以jar形式运行,则“找不到模板”
java
、
maven
、
spring-boot
、
thymeleaf
<dependency> <artifactId>
spring
-boot-starter-web<version>2.0.5.RELEASE</version> </dependencies> 背景:
s
浏览 0
提问于2018-09-21
得票数 4
回答已采纳
2
回答
使用网络流量服务jar的内容?
spring-webflux
、
static-files
我使用
Spring
生成文档。然后我把它放进肥罐子里。/BOOT-INF/classes/static/docs/index.html 我怎样才能使用网络流量来提供这样的文件?
浏览 0
提问于2018-12-17
得票数 1
回答已采纳
1
回答
从webapp项目外部导入jsp和html页面。
java
、
jsp
、
spring-mvc
、
tomcat
我正在尝试在
spring
mvc的一个jsp页面中导入几个jsp和html页面。
浏览 1
提问于2015-03-19
得票数 0
2
回答
如何在春季启动时为胸腺细胞设置
前缀
路径?
spring-boot
如何设置
前缀
路径(设置新目录)来呈现HTML页面? 我为查看页面设置了一个新的路径。
浏览 0
提问于2019-09-05
得票数 7
回答已采纳
1
回答
Spring
MVC JSP模板解析器
jsp
、
spring-mvc
我实际上使用的是
Spring
MVC、
Spring
Security和Thymeleaf。如何在我的应用程序中添加使用jsp的可能性?我尝试将这些行添加到我的applications.properties中
spring
.mvc.view.suffix) { }我的模板位于文件夹src/
浏览 3
提问于2016-02-17
得票数 1
1
回答
在Maven子模块中使用
Spring
@PropertySource
java
、
spring
、
maven
、
resources
、
pom.xml
在
Spring
应用程序中,我有一个模块,并且能够注入一个配置文件,例如"my.properties",该文件位于src/main/resources中,如下所示:@PropertySource
浏览 2
提问于2015-07-26
得票数 3
回答已采纳
1
回答
Spring
Maven -资源文件夹中的上下文配置
java
、
spring
、
maven
、
servlets
、
jetty
正如我在stackoverflow的其他问题中发现的,最好将
spring
的配置保存在src/main/resources文件夹中。
浏览 4
提问于2013-05-15
得票数 1
3
回答
无法在可执行jar中运行的java项目中找到文件
java
、
executable-jar
class.getResource(FILE_NAME)和class.getClass().getClassLoader().getResource(FILE_NAME)在我的eclipse中都运行得很好,但是在windows机器中作为可执行的jar运行时,相同的代码无法找到jar文件中的文件。总之,我已经解决了4起案件,但到目前为止都没有效果,我现在没有什么想法了。 class.getClass().getClass
浏览 0
提问于2018-02-15
得票数 0
回答已采纳
1
回答
Spring
(1.3.5) -默认错误视图
java
、
spring
、
spring-mvc
、
spring-boot
、
spring-web
我使用
Spring
(v1.3.5.RELEASE)。在文档中,有关于错误处理的: <dependency> <artifactId>
spring
-boot-starter-freemarker因此,我移动了这个文件(现在
浏览 3
提问于2016-09-12
得票数 1
1
回答
使用*(类路径*:
前缀
)加载
Spring
资源
spring
、
spring-boot
在
Spring
中,使用XML的bean初始化支持使用
classpath
*:
前缀
(ant样式)加载资源。<bean id="mapper" class="org.Class" <property name="mappingFiles" value="
classpath
浏览 0
提问于2015-04-08
得票数 0
回答已采纳
1
回答
Servlet Autowire失败
java
、
spring
、
servlets
、
autowired
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this,} <param-name>contextConfigLocation</param-name>
classpath
*:META-INF/cmn-dao-<e
浏览 2
提问于2013-12-08
得票数 1
回答已采纳
1
回答
在
spring
Boot中使用
Spring
profiles读取多个属性文件
java
、
spring
、
spring-boot
、
spring-profiles
我正尝试在
spring
boot中加载2个属性文件。其中一个包含元数据(数据库连接和其他类似属性)。另一个包含业务逻辑(上下游实体之间的映射。我想在不同的环境(Dev,Stage,Prod)中使用
Spring
Profiles。因此,我在src/main/resources 1中为每个环境创建了3个不同的文件夹。使用
spring
profies,我知道如何使用env特定的应用程序-env.properties文件。然而,我无法在我的用例中使用相同的方法。 PS :不添加任何代码片段,因为问题不需要代码片段。
浏览 9
提问于2021-10-07
得票数 0
1
回答
如何使用
Spring
4引用另一个web项目的静态资源
java
、
spring
、
spring-mvc
、
web
、
static
如何使用
Spring
4从另一个web项目中引用静态资源。我们有两个项目,一个使用conext根/SampleWeb,另一个使用/SampleStatic。示例web项目是一个
Spring
4应用程序,需要从/SampleStatic项目访问静态HTML页面。 我们尝试了以下MVC资源处理程序的配置,但是它不起作用。
浏览 1
提问于2016-10-07
得票数 1
回答已采纳
2
回答
初始化打包在jar文件中的
Spring
beans
java
、
spring
、
spring-mvc
在web应用程序中,我们定义了
spring
的上下文配置位置,以便像这样初始化所有bean <context-param> <param-value>/WEB-INF/
spring
/ctx-*.xml</param-value> &l
浏览 0
提问于2010-03-05
得票数 5
2
回答
如何使用@ContextConfiguration注解加载application-context.xml
java
、
spring
、
junit4
我的项目结构如下:src/main/resources/
spring
/context/application-context.xml
浏览 2
提问于2014-05-29
得票数 0
2
回答
如何使用
前缀
来创建
Spring
ApplicationContext?
java
、
spring
、
spring-mvc
、
applicationcontext
我正在学习
Spring
认证,我对如何正确地将新的FileSystemXmlApplicationContext声明为
Spring
4应用程序有疑问。我知道,在我的main()方法中,我可以得到如下内容: ApplicationContext context = new FileSystemXmlApplicationContext("
classpath
mycompany.mydivision.myapplication.application.config.xml", "file:test-infra-conf
浏览 2
提问于2015-04-13
得票数 2
2
回答
Spring
: PropertyPlaceholderConfigurer找不到属性文件
java
、
spring
、
properties
、
classpath
、
osgi
我对使用PropertyPlaceholderConfigurer的
Spring
有一个奇怪的问题。org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <value>
classpath
我几乎尝试了所有的组合("jdbc.properties“、"/jdbc.properties”、"
浏览 1
提问于2011-08-25
得票数 3
1
回答
如何跨不同的xml文件访问中的bean
java
、
hibernate
、
spring
我的
spring
hibernate应用程序中有三个xml文件<security:authentication-manager> <<constructor-arg ref="registrationDAO"
浏览 0
提问于2011-03-28
得票数 0
回答已采纳
1
回答
将
spring
引导从1.5.12迁移到1.5.13后,ehcache出现错误
spring-boot
、
spring-cache
我已经配置了
spring
引导1.5.12 + ehcache,在我将
spring
引导升级到1.5.13之前,一切正常。application.yml有以下条目 cache: provider: org.ehcache.jsr107.EhcacheCachingProviderorg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrate
浏览 0
提问于2018-06-05
得票数 5
回答已采纳
点击加载更多
相关
资讯
Spring+Mybatis整合
SpringBoot教程(2):静态化
SpringBoot模块组成
Spring Boot数据源属性注入与创建
Spring Cloud Finchley.SR1 发布,修复模块的 bug
热门
标签
更多标签
云服务器
ICP备案
对象存储
即时通信 IM
实时音视频
活动推荐
运营活动
广告
关闭
领券